Read only forced on jffs2 by mtd layer?

Josh Boyer jwboyer at gmail.com
Fri Mar 10 11:21:38 EST 2006


On 3/10/06, Artem B. Bityutskiy <dedekind at yandex.ru> wrote:
> Josh Boyer wrote:
> > Sorta.  If there isn't enough physical space to write nodes out, then
> > you can't really have a writeable filesystem.  It'll actually just
> > return -ENOSPC for everything instead of -EROFS, but the effect is the
> > same.
> I mean, if I ask to mount read-write, but end-up with RO, this is bad.
> Shouldn't I explicitely request RO mount?

Oh, the mount will still show it as being RW from what I recall.  But
you won't actually be able to write anything.  Which is also
confusing.  Especially in the case where it won't even let you
_delete_ things.

> > Take a look at jffs2_calc_trigger_levels in build.c.
> > c->resv_blocks_deletion is the number of blocks needed to delete
> > something.  c->resv_blocks_write is the number of blocks needed to
> > write something.
> Ok, but where is the code that switches it to RO mode in case of lack of
> eraseblocks?

It doesn't do that.  It just returns -ENOSPC.  Sorry if I've confused anyone.

josh




More information about the linux-mtd mailing list