All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Jun Li <junmuzi@gmail.com>
Cc: juli@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com, josh.durgin@inktank.com
Subject: Re: [Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF
Date: Thu, 11 Dec 2014 10:13:03 +0100	[thread overview]
Message-ID: <5489601F.1060000@redhat.com> (raw)
In-Reply-To: <20141211091206.GB3909@noname.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>
>> ---
>> 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.

Max

  reply	other threads:[~2014-12-11  9:13 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 [this message]
2014-12-11  9:54     ` jun muzi
2014-12-11  9:58       ` Max Reitz

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=5489601F.1060000@redhat.com \
    --to=mreitz@redhat.com \
    --cc=famz@redhat.com \
    --cc=josh.durgin@inktank.com \
    --cc=juli@redhat.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.