[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2] virtio-blk: trivial code optimization
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH v2] virtio-blk: trivial code optimization |
Date: |
Mon, 9 Nov 2015 09:41:52 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 09/11/2015 04:19, address@hidden 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