qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] block/raw-posix: detect readonly LVM volumes using BLKROGET
Date: Mon, 04 Feb 2013 15:49:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Stefan Hajnoczi <address@hidden> writes:

> LVM volumes can be set read-only with "lvchange --permission r
> <volume>".  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 out --setro there.

> This results in odd behavior for QEMU.  bdrv_open() is supposed to fail
> if a read-only image is being opened with BDRV_O_RDWR.  By not failing
> for LVM volumes, the guest boots up but every write produces an I/O
> error.
>
> This patch checks whether the block device is read-only so that LVM
> volumes behave like regular files.
>
> Reported-by: Sibiao Luo <address@hidden>
> Suggested-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>

Patch looks good to me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]