1:1 mapping
Ferenc Havasi
havasi at inf.u-szeged.hu
Fri Sep 23 04:10:15 EDT 2005
zhao forrest wrote:
> Your patch may have problem.
> In fact this "reject to mount when cross-boundary" has been in my
> patch, it's quite simple. This code segment is extracted from my patch:
>
> @@ -570,10 +584,8 @@ scan_more:
> /* Eep. Node goes over the end of the erase block. */
> printk(KERN_WARNING "Node at 0x%08x with length 0x%08x would
> run over the end of the erase block\n",
> ofs, je32_to_cpu(node->totlen));
> - printk(KERN_WARNING "Perhaps the file system was created
> with the wrong erase size?\n");
> - DIRTY_SPACE(4);
> - ofs += 4;
> - continue;
> + printk(KERN_NOTICE "Perhaps the file system
> was created with the wrong erase size? Reject to mount.\n");
> + return -EINVAL;
> }
My patch has one more part: detecting that case, if the node header is
also cross-boundary. But that case we cannot say: it is absolutely sure
that it is a cross-boundary node, just can say: it is likely.
Forutnatelly the node header is small enough to say that if someone uses
bad (larger) erase block size, there will be a cross-boundary node which
have a correct node header at the end of the erase block, and only the
body is cross-boundary.
So If everyone agrees we can commit this small part of Zhao's patch.
Ferenc
More information about the linux-mtd
mailing list