[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: return EPERM on writes or discards to re
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] block: return EPERM on writes or discards to read-only devices |
Date: |
Fri, 8 May 2015 11:13:24 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, May 07, 2015 at 05:45:48PM +0200, Paolo Bonzini wrote:
> This is the behavior in the operating system, for example Linux's
> blkdev_write_iter has the following:
>
> if (bdev_read_only(I_BDEV(bd_inode)))
> return -EPERM;
>
> This does not apply to opening a device for read/write, when the
> device only supports read-only operation. In this case any of
> EACCES, EPERM or EROFS is acceptable depending on why writing is
> not possible.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> block/io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
pgp7iAj1gm2xh.pgp
Description: PGP signature