From: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
ceph-devel@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>,
pve-devel@pve.proxmox.com, josh.durgin@inktank.com
Subject: Re: [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int
Date: Wed, 21 Nov 2012 08:47:16 +0100 [thread overview]
Message-ID: <50AC8704.2020407@profihost.ag> (raw)
In-Reply-To: <CAJSP0QXcjaRdeQ55GSPtSqam+WHUGPAz4+ohajTCMR8f+4oKrQ@mail.gmail.com>
Am 21.11.2012 07:41, schrieb Stefan Hajnoczi:
> On Tue, Nov 20, 2012 at 8:16 PM, Stefan Priebe <s.priebe@profihost.ag> wrote:
>> Hi Stefan,
>>
>> Am 20.11.2012 17:29, schrieb Stefan Hajnoczi:
>>
>>> On Tue, Nov 20, 2012 at 01:44:55PM +0100, Stefan Priebe wrote:
>>>>
>>>> rbd / rados tends to return pretty often length of writes
>>>> or discarded blocks. These values might be bigger than int.
>>>>
>>>> Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
>>>> ---
>>>> block/rbd.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>>
>>> Looks good but I want to check whether this fixes an bug you've hit?
>>> Please indicate details of the bug and how to reproduce it in the commit
>>> message.
>>
>>
>> you get various I/O errors in client. As negative return values indicate I/O
>> errors. When now a big positive value is returned by librbd block/rbd tries
>> to store this one in acb->ret which is an int. Then it wraps around and is
>> negative. After that block/rbd thinks this is an I/O error and report this
>> to the guest.
>
> It's still not clear whether this is a bug that you can reproduce.
> After all, the ret value would have to be >2^31 which is a 2+ GB
> request!
Yes and that is the fact.
Look here:
if (acb->cmd == RBD_AIO_WRITE ||
acb->cmd == RBD_AIO_DISCARD) {
if (r < 0) {
acb->ret = r;
acb->error = 1;
} else if (!acb->error) {
acb->ret = rcb->size;
}
It sets acb->ret to rcb->size. But the size from a DISCARD if you
DISCARD a whole device might be 500GB or today even some TB.
Greets,
Stefan
next prev parent reply other threads:[~2012-11-21 7:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 12:44 [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int Stefan Priebe
2012-11-20 16:29 ` Stefan Hajnoczi
2012-11-20 19:16 ` Stefan Priebe
2012-11-21 6:41 ` Stefan Hajnoczi
2012-11-21 7:47 ` Stefan Priebe - Profihost AG [this message]
2012-11-21 8:26 ` Stefan Hajnoczi
2012-11-21 8:33 ` Stefan Priebe - Profihost AG
2012-11-21 8:43 ` Stefan Hajnoczi
2012-11-21 17:03 ` Stefan Weil
2012-11-21 20:53 ` Stefan Priebe - Profihost AG
2012-11-21 22:32 ` Peter Maydell
2012-11-22 8:23 ` Stefan Priebe - Profihost AG
2012-11-22 8:40 ` Peter Maydell
2012-11-22 9:08 ` Stefan Priebe - Profihost AG
-- strict thread matches above, loose matches on Subject: below --
2012-11-21 21:26 Stefan Weil
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=50AC8704.2020407@profihost.ag \
--to=s.priebe@profihost.ag \
--cc=ceph-devel@vger.kernel.org \
--cc=josh.durgin@inktank.com \
--cc=pbonzini@redhat.com \
--cc=pve-devel@pve.proxmox.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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).