[PATCH 1/3] mtd_debug: report ecc layout
Artem Bityutskiy
dedekind1 at gmail.com
Wed Aug 17 04:32:10 EDT 2011
On Wed, 2011-08-10 at 10:07 -0700, Brian Norris wrote:
> On Tue, Aug 9, 2011 at 1:57 PM, Ben Gardiner <bengardiner at nanometrics.ca> wrote:
> > Add the ECC size and OOB available to that list. The other entries in the
> > ecclayout struct are arrays and are not as meaningful as eccsize and oobavail.
> > ---
> > I noticed that the struct nand_ecclayout_user and its corresponding ioctl
> > has been marked deprecated; however, since this is a 'debug' utility and at
> > least one person found it useful I thought it would be a good idea to propose
> > these changes anyways.
>
> While I agree with your rationale for ignoring the deprecation (it's
> OK for a debug utility), users of this feature should be warned that
> struct nand_ecclayout_user will not report all information if there
> are more ECC entries than "MTD_MAX_ECCPOS_ENTRIES" (i.e., 64). It will
> simply truncate ECC at 64. This may be a problem for large page flash
> with large ECC regions. It's a similar story for "oobavail" as well.
>
> And before the question is asked, I'm not sure how to implement my
> suggestion that "users of this feature should be warned". Perhaps just
> a comment in the code?
I guess we can do the following:
1. make sure mtd-utils does not use the depricated ioctl
2. release such mtd-utils
3. change the kernel and add a warning printk there
4. wait some time and kill the ioctl from the kernel.
--
Best Regards,
Artem Bityutskiy
More information about the linux-mtd
mailing list