From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com
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 [thread overview]
Message-ID: <20150508101324.GG11717@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1431013548-22492-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 719 bytes --]
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 <pbonzini@redhat.com>
> ---
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-05-08 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 15:45 [Qemu-devel] [PATCH] block: return EPERM on writes or discards to read-only devices Paolo Bonzini
2015-05-08 10:05 ` Stefan Hajnoczi
2015-05-08 10:13 ` Stefan Hajnoczi [this message]
2015-05-08 10:24 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150508101324.GG11717@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).