From: Paolo Bonzini <pbonzini@redhat.com>
To: arei.gonglei@huawei.com, qemu-devel@nongnu.org
Cc: stefanha@redhat.com, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] virtio-blk: trivial code optimization
Date: Mon, 9 Nov 2015 09:41:52 +0100 [thread overview]
Message-ID: <56405C50.1010600@redhat.com> (raw)
In-Reply-To: <1447039178-17208-1-git-send-email-arei.gonglei@huawei.com>
On 09/11/2015 04:19, arei.gonglei@huawei.com wrote:
> + * 1. requests are not sequential
> + * 2. merge would exceed maximum number of IOVs
> + * 3. merge would exceed maximum transfer length of backend device
> + */
> + if (sector_num + nb_sectors != req->sector_num ||
> + niov > IOV_MAX - req->qiov.niov ||
> + req->qiov.size / BDRV_SECTOR_SIZE + nb_sectors > max_xfer_len) {
Hi Gonglei,
the third condition should also be changed to "new > max - old".
Thanks,
Paolo
next prev parent reply other threads:[~2015-11-09 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 3:19 [Qemu-devel] [PATCH v2] virtio-blk: trivial code optimization arei.gonglei
2015-11-09 6:48 ` Fam Zheng
2015-11-09 8:41 ` Paolo Bonzini [this message]
2015-11-09 8:51 ` Gonglei
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=56405C50.1010600@redhat.com \
--to=pbonzini@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=qemu-block@nongnu.org \
--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.