JFFS2 - increase MAX_SUMMARY_SIZE to address warning

Scottie Shore sshore at iders.ca
Thu Dec 16 17:36:31 EST 2010


Hello,

We frequently see warnings in dmesg similar to the ones below when using JFFS2 on nand flash with 512KiB page size. According to the summary code, this means that the summary size for a page is over MAX_SUMMARY_SIZE of 64KiB, so the summary is discarded.

JFFS2 warning: (549) jffs2_sum_write_data: Not enough space for summary, padsize = -3208
JFFS2 warning: (549) jffs2_sum_write_data: Not enough space for summary, padsize = -3352

The comments with MAX_SUMMARY_SIZE say that 64KiB was chosen so that kmalloc can be used, however other sources say that kmalloc can allocate up to 128KiB. I've updated MAX_SUMMARY_SIZE to 128KiB according to the attached patch and tested on our hardware for about a week with frequent heavy read/write cycles. So far I've encountered no problems, and no further warnings. I'm concerned that a fix this easy may be wrong in a non-obvious way, though.

Are there platforms where this change would not work?
Does this change cause problems that might not be immediately visible?
If there's no concerns about same, could the patch be applied to the mainline code?

Regards,

Scottie Shore
Iders, Inc.
<html>
<body>
Scottie Shore Embedded Software Developer Iders Incorporated 27047 Oakwood Road Oakbank, MB R0E 1J2 Tel (204) 444-5200 ext 282 Fax: (204) 444-5900 [http://www.iders.ca/IDERS_logo.jpg] ________________________________ Iders Incorporated Confidential: ________________________________
 This message is intended solely for the use of the designated recipient(s) and their appointed delegates, and may contain confidential information. Any unauthorized disclosure, copying or distribution of its contents is strictly prohibited. If you have received
 this message in error, please destroy it and advise the sender immediately by phone, Email or facsimile.
</body>
</html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jffs2-summary.patch
Type: text/x-patch
Size: 602 bytes
Desc: jffs2-summary.patch
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101216/7a0e1245/attachment.bin>


More information about the linux-mtd mailing list