[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jffs_erasable_size: offset = 0x0034b000



Nick Ivanter wrote:
> 
> David Woodhouse wrote:
> 
> > dwmw2@xxxxxxx.org said:
> > > Under what circumstances can jffs_flash_erasable_size() get called
> > > with an  offset which isn't erase-block-aligned?
> >
> > > jffs_flash_erasable_size() given non-aligned offset 34b000 (erasesize 20000)
> >
> > Hmmm. Could it perhaps be related to the fact that this JFFS image was
> > produced on an MTD device with an erase size of 4Kb and then transplanted to
> > real flash with an erase size of 128Kb?
> >
> > --
> > dwmw2
> 
> This could be because sector_size member of struct jffs_fmcontrol is _always_ set
> to 64K!! But not to erasesize of the underlying MTD driver. I think it is a bug.

I agree that this is wrong.  fmc->sector_size should be equal to
mtd->erasesize.
Maybe Bjorn could explain why jffs_erasable_size used
part->chip->sectorsize while fmc->sectorsize is defined to 64 kb ?  Is
this really a mistake or is there an obscur reason for this ?


-- 
Sébastien Côté