Re: PATCH: fix-readonly-policy-use-and-floppy-ro-rw-status

From: Jon Masters
Date: Sat Nov 05 2005 - 14:40:12 EST


On 11/5/05, Al Viro <viro@xxxxxxxxxxxxxxxx> wrote:

> ->remount_fs() certainly can refuse to go r/w - you don't need anything
> new for that, just don't leave MS_RDONLY in *flags.

Sure.

> The real trouble starts when fs wants to go r/o on its own

Although the situation here is really the other way around -
filesystem is mounted readonly (at least in this case with floppies -
but there are probably others too) and wants to go rw. When asked, we
need to check that the media is able to do handle that transition.
Currently I've bodged floppy.c to store this in policy/readonly (which
is what got me looking at genhd last week) but really there should be
a better way - one where we do this once we get to do_remount_sb or
whatever. This seems to be missing functionality.

> e.g. when it sees an error bad enough to warrant that. And that, BTW, is very
> likely to require more than just one bit in ->policy - we want all IO on that device
> to fail until after we actually close it during umount. As it is, we can get anything,
> including block allocations (e.g. if we have a dirty mapping and it gets written to disk).

Ok. So what you're saying is that this is more complex than I'd
implied and you're right :-) But aside from that, you're the expert
and I'm willing to go be a patch monkey, so just tell me what you
think is worth trying...

Jon.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/