[PATCH] flash_eraseall: only add cleanmarkers on known flashtypes

Artem Bityutskiy dedekind at infradead.org
Tue Mar 24 02:03:43 EDT 2009


On Tue, 2009-03-24 at 08:02 +0200, Artem Bityutskiy wrote:
> On Mon, 2009-03-23 at 23:42 +0100, Sebastian Andrzej Siewior wrote:
> > +       switch (meminfo->type) {
> > +       case MTD_ROM:
> > +       case MTD_RAM:
> > +       case MTD_NORFLASH:
> >                 cleanmarker.totlen = cpu_to_je32(sizeof(struct
> > jffs2_unknown_node));
> > -       else {
> > -               struct nand_oobinfo oobinfo;
> > +               break;
> > +
> > +       case MTD_DATAFLASH:
> > +       case MTD_UBIVOLUME:
> > +               fprintf(stderr, "JFFS2 layout not supported on this
> > flash.\n");
> > +               return -1;
> > +               break;
> 
> This should also include MLC NAND flash. To make you nice patches
> even better you should call MEMGETOOBSEL ioctl in case of NAND and
> check if there is really enough bytes for clean-marker.
> 
> But I guess you do not have to do this.

Err, sorry, this seems to be already there :-) Need some coffee.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list