From: Max Reitz <mreitz@redhat.com>
To: jun muzi <junmuzi@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Josh Durgin <josh.durgin@inktank.com>,
Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF
Date: Thu, 11 Dec 2014 10:58:41 +0100 [thread overview]
Message-ID: <54896AD1.6030600@redhat.com> (raw)
In-Reply-To: <CAB5ADv9gywOe3byn-pU4keKr6r9B_WFRXfmBS7oGqUokPFQF-A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]
On 2014-12-11 at 10:54, jun muzi wrote:
>
> Jun Li
> 2014-12-11 下午5:13于 "Max Reitz" <mreitz@redhat.com
> <mailto:mreitz@redhat.com>>写道:
> >
> > On 2014-12-11 at 10:12, Kevin Wolf wrote:
> >>
> >> Am 11.12.2014 um 07:25 hat Jun Li geschrieben:
> >>>
> >>> Currently, as rbd driver do not support dynamic growth when write
> beyond EOF,
> >>> so just print a clear error message.
> >>>
> >>> Signed-off-by: Jun Li <junmuzi@gmail.com <mailto:junmuzi@gmail.com>>
> >>> ---
> >>> v2:
> >>> Just use rbd_aio_write to realize error detection.
> >>> ---
> >>> block/rbd.c | 4 ++++
> >>> 1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/block/rbd.c b/block/rbd.c
> >>> index 5b5a64a..710ee3e 100644
> >>> --- a/block/rbd.c
> >>> +++ b/block/rbd.c
> >>> @@ -661,6 +661,10 @@ static BlockAIOCB
> *rbd_start_aio(BlockDriverState *bs,
> >>> }
> >>> if (r < 0) {
> >>> + if (r == -EINVAL && cmd == RBD_AIO_WRITE) {
> >>> + fprintf(stderr, "Image formats that grow on demand "
> >>> + "are not supported on rbd.\n");
> >>> + }
> >>> goto failed_completion;
> >>> }
> >>
> >> You can't fill up the log with messages like that. In general, if you
> >> use fprintf() in a function whose call can be triggered by the guest,
> >> you're doing it wrong.
> >>
> >> What needs to be done is to check at open time whether the
> configuration
> >> works. Max has sent a series to that end a while ago, not sure what its
> >> status is. I think it ended up depending on some blockdev work.
> >
> >
> > Yes, the status is that we need to remove "growable" from the BDS first.
> >
>
> Hi, which serial do you mean? Could you give a link? Thx.
>
Hi, here it is:
http://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg02088.html
Max
[-- Attachment #2: Type: text/html, Size: 3395 bytes --]
prev parent reply other threads:[~2014-12-11 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 6:25 [Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF Jun Li
2014-12-11 9:12 ` Kevin Wolf
2014-12-11 9:13 ` Max Reitz
2014-12-11 9:54 ` jun muzi
2014-12-11 9:58 ` Max Reitz [this message]
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=54896AD1.6030600@redhat.com \
--to=mreitz@redhat.com \
--cc=famz@redhat.com \
--cc=josh.durgin@inktank.com \
--cc=junmuzi@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 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.