Re: [Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET

2013-02-05 Thread Stefan Hajnoczi
On Mon, Feb 04, 2013 at 03:49:10PM +0100, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > LVM volumes can be set read-only with "lvchange --permission r > > ". The device node permissions remain unchanged so the volume > > can still be opened O_RDWR. Actual writes will fail. > > Are y

Re: [Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET

2013-02-04 Thread Markus Armbruster
Stefan Hajnoczi writes: > LVM volumes can be set read-only with "lvchange --permission r > ". The device node permissions remain unchanged so the volume > can still be opened O_RDWR. Actual writes will fail. Are you sure it's just LVM? blockdev(8) suggests it's a more general issue. Check ou

[Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET

2013-02-04 Thread Stefan Hajnoczi
LVM volumes can be set read-only with "lvchange --permission r ". The device node permissions remain unchanged so the volume can still be opened O_RDWR. Actual writes will fail. This results in odd behavior for QEMU. bdrv_open() is supposed to fail if a read-only image is being opened with BDRV