Query mtd-utils v1.4.9 : flash_erase.c

Kushwaha Prabhakar-B32579 B32579 at freescale.com
Thu Apr 5 20:44:48 EDT 2012


Thanks Brian for the clarification.

Please find few more queries in-lined.


> -----Original Message-----
> From: Brian Norris [mailto:computersforpeace at gmail.com]
> Sent: Friday, April 06, 2012 2:28 AM
> To: Kushwaha Prabhakar-B32579
> Cc: Wood Scott-B07421; linux-mtd at lists.infradead.org
> Subject: Re: Query mtd-utils v1.4.9 : flash_erase.c
> 
> On Thu, Apr 5, 2012 at 2:21 AM, Kushwaha Prabhakar-B32579
> <B32579 at freescale.com> wrote:
> >  I checked latest mtd-utils ver 1.4.9 for file flash_erase.c.
> >
> > It usage MEMGETOOBSEL ioctl to get OOB information from the driver. But
> this ioctl may returns error for big NAND chips.
> > The reason of failure would be the following condition at
> > linux/driver/mtd/mtdchar.c
> >  if (mtd->ecclayout->eccbytes > ARRAY_SIZE(oi.eccpos))
> >
> > MEMGETOOBSEL has been obsolete. then Why mtd-utils still using it.
> 
> A few reasons:
> (1) There is no replacement interface and there is no plan for a
> replacement AFAIK (unless you count MTD_OOB_AUTO within the kernel, as
> you mention).
> (2) It's only used for the legacy option JFFS2 format option (-j or --
> jffs2). JFFS2 isn't supported much anymore, and it probably is not worth
> using on "big NAND chips." On some systems, ECC does not even leave
> enough room in OOB for JFFS2.

Looks like mtd-utils is no more interested in supporting jffs2 for big NAND chips.

Going forward,  ubifs is the File system for NAND chips supported by mtd-utils??


> 
> > Also, I don't think flash_erase.c supports MTD_OOB_AUTO. Although its
> support is already part of Linux kernel.
> 
> What do you mean by "support MTD_OOB_AUTO" (this is actually renamed
> MTD_OPS_AUTO_OOB, btw)? If you're speaking of the -j option still, then
> it's probably because nobody has bothered supporting old features on new
> userspace tools with new (large-OOB) chips. This would require a
> developer who cares about JFFS2 to compare the various versions of
> "autoplace." It wouldn't be too hard to make this use MTD_OPS_AUTO_OOB; I
> just haven't studied auto/jffs2 much...
> 

Means, If I want to use, I have to make local changes in mtd-utils :(
Is there any plan to support MTD_OPS_AUTO_OOB in future in-case somebody send patch?

--Prabhakar








More information about the linux-mtd mailing list