All of lore.kernel.org
 help / color / mirror / Atom feed
* block device read-only handling regression in 2.6.38-rc4 (bisected)
@ 2011-02-13  2:02 Milan Broz
  2011-02-13 10:58 ` [PATCH] loop: clear read-only flag in loop_clr_fd Tao Ma
  0 siblings, 1 reply; 30+ messages in thread
From: Milan Broz @ 2011-02-13  2:02 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Jens Axboe, Linux Kernel Mailing List

Hi Tejun,

Seems this commit cause regressions:

commit 75f1dc0d076d1c1168f2115f1941ea627d38bd5a
Author: Tejun Heo <tj@kernel.org>
Date:   Sat Nov 13 11:55:17 2010 +0100

    block: check bdev_read_only() from blkdev_get()
    
    bdev read-only status can be queried using bdev_read_only() and may
    change while the device is being opened.  Enforce it by checking it
    from blkdev_get() after open succeeds.


1) loop device once set read-only is not able to be used read-write afterward

touch /x1.img
losetup -r /dev/loop0 /x1.img
losetup -d /dev/loop0
losetup /dev/loop0 /x1.img
/dev/loop0: Permission denied


2) it breaks read-only dm-snapshots
(Fedora LiveCD operations is broken by this as well.)

(x.img is backing device, xs.img is prepared COW, you can simply run it
once in read-write to create dm-snap header and then re-run this commands)

losetup -r /dev/loop0 /x.img
losetup -r /dev/loop1 /xs.img
dmsetup create x --readonly --table '0 131072 snapshot /dev/loop0 /dev/loop1 p 8'
device-mapper: reload ioctl failed: Permission denied

Milan

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

end of thread, other threads:[~2011-02-16  8:46 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-13  2:02 block device read-only handling regression in 2.6.38-rc4 (bisected) Milan Broz
2011-02-13 10:58 ` [PATCH] loop: clear read-only flag in loop_clr_fd Tao Ma
2011-02-13 14:11   ` Milan Broz
2011-02-13 15:05     ` Tao Ma
2011-02-13 16:44       ` Milan Broz
2011-02-14 10:30         ` Tejun Heo
2011-02-14 11:47           ` Milan Broz
2011-02-14 13:14             ` [PATCH][RFC] dm: Do not open log and cow device read-write for read-only mappings Milan Broz
2011-02-14 14:09               ` Tejun Heo
2011-02-14 14:23                 ` Milan Broz
2011-02-14 15:44                   ` Tejun Heo
2011-02-14 23:15                     ` NeilBrown
2011-02-15  2:03                       ` [dm-devel] " Alasdair G Kergon
2011-02-15 12:17                         ` Milan Broz
2011-02-15 12:46                           ` Alasdair G Kergon
2011-02-15 15:20                             ` Tejun Heo
2011-02-15 15:46                               ` Alasdair G Kergon
2011-02-15 15:50                                 ` Tejun Heo
2011-02-15 16:05                                   ` Milan Broz
2011-02-15 16:12                                     ` Tejun Heo
2011-02-15 16:36                                       ` Milan Broz
2011-02-15 16:41                                         ` Tejun Heo
2011-02-15 16:56                                           ` Alasdair G Kergon
2011-02-16  8:46                                             ` Tejun Heo
2011-02-16  8:46                                               ` Tejun Heo
2011-02-15 16:58                                           ` Milan Broz
2011-02-16  8:39                                             ` Tejun Heo
2011-02-15 15:16                           ` [PATCH] Return EROFS if read-only detected on block device Milan Broz
2011-02-14 14:39                 ` [dm-devel] [PATCH][RFC] dm: Do not open log and cow device read-write for read-only mappings Alasdair G Kergon
2011-02-14 14:07             ` [PATCH] loop: clear read-only flag in loop_clr_fd Tejun Heo

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.