[PATCH]fs/jffs2/wbuf.c: add compatibility support for OOB data block
Ferenc Havasi
havasi at inf.u-szeged.hu
Mon Aug 15 07:48:57 EDT 2005
Hi Artem,
> Ok, to keep you busy with some technical stuff also, here is a remark.
>
> >+ if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC ) {
> >+
> >+ if(je32_to_cpu(sm->erase_size) == c->sector_size) {
> >+ err =
> >jffs2_sum_scan_sumnode(c,jeb,je32_to_cpu(sm->offset),&pseudo_random);
> >+
> >+ if (err) {
> >+ kfree(sm);
> >+ return err;
> >+ }
> >+ }
> >+ printk(KERN_WARNING "FS erase_block_size != JFFS2
> erase_block_size => skipping summary information\n");
> >+ }
>
> if(je32_to_cpu(sm->erase_size) == c->sector_size) { ...
>
> AFAIU, you're protecting against the situation when the size of the
> JFFS2 virtual eraseblock is changed.
No. The task of this condition is to make sure that the summary was
generated correctly. If the summary is generated by the filesystem, it
will be always good, but you are also able to generate summary with the
userspace tool 'sumtool'. If we do not recognise this mistake that can
cause big problems and make the user confused.
Bye,
Ferenc
More information about the linux-mtd
mailing list