linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How far should BLKROSET/set_device_ro() go?
@ 2007-02-06  5:03 Eric Sandeen
  0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2007-02-06  5:03 UTC (permalink / raw)
  To: linux-kernel Mailing List

While looking at another bug a while ago, I noticed that in 2.6 at 
least, set_device_ro() sets the policy on the hd_struct to mark it 
readonly, but it appears that IO is only really blocked from userspace, 
via generic_write_checks().

There are bdev_read_only() checks in other places, but nothing in a 
common spot to reject all possible IO.

Should we have something in generic_make_request() to reject ALL IO on a 
readonly bdev, or is that further than the policy is supposed to go?  Or 
is it up to each location that might possibly issue that IO to check it 
and be well-behaved?

The motivation for this investigation was ext3 happily doing orphan 
inode recovery on read-only lvm snapshot....

Thanks,

-Eric

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-06  5:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06  5:03 How far should BLKROSET/set_device_ro() go? Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).