All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] block: enforce ioctl(BLKROSET) and set_disk_ro()
@ 2017-11-09 18:44 Ilya Dryomov
  2017-11-09 18:45 ` [PATCH 1/2] block: fail op_is_write() requests to read-only partitions Ilya Dryomov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ilya Dryomov @ 2017-11-09 18:44 UTC (permalink / raw)
  To: linux-block; +Cc: Christoph Hellwig, Jens Axboe, Tejun Heo, David Disseldorp

Hello,

I was doing some cleanup work on rbd BLKROSET handler and discovered
that we ignore partition rw/ro setting (hd_struct->policy) for pretty
much everything but straight writes.

David (CCed) has blktests patches standing by.

(Another aspect of this is that we don't enforce open(2) mode.  Tejun
took a stab at this a few years ago, but his patch had to be reverted:

  75f1dc0d076d ("block: check bdev_read_only() from blkdev_get()")
  e51900f7d38c ("block: revert block_dev read-only check")

It is a separate issue and refusing writes to read-only devices is
obviously more important, but perhaps it's time to revisit that as
well?)

Thanks,

                Ilya


Ilya Dryomov (2):
  block: fail op_is_write() requests to read-only partitions
  block: add bdev_read_only() checks to common helpers

 block/blk-core.c | 23 ++++++++++++++++++++++-
 block/blk-lib.c  | 12 ++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-28  9:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 18:44 [PATCH 0/2] block: enforce ioctl(BLKROSET) and set_disk_ro() Ilya Dryomov
2017-11-09 18:45 ` [PATCH 1/2] block: fail op_is_write() requests to read-only partitions Ilya Dryomov
2017-11-28  9:07   ` Sagi Grimberg
2017-11-09 18:45 ` [PATCH 2/2] block: add bdev_read_only() checks to common helpers Ilya Dryomov
2017-11-16  9:02 ` [PATCH 0/2] block: enforce ioctl(BLKROSET) and set_disk_ro() Ilya Dryomov
2017-11-27  9:19   ` Ilya Dryomov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.