diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-21 11:00:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-21 11:00:36 +0100 |
commit | 61ead113ae53a4dae63b5377ace1300cb8705682 (patch) | |
tree | 7bce8156491303346fd6ff82504f074b71b8cb84 /hw | |
parent | b95aae121b966ef6cd0781a6610c6902b272c542 (diff) | |
parent | decaeed7734bddc95e2c81858fbbec3e923310a1 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
v2:
* Resolved merge conflict with block/iscsi.c [Peter]
# gpg: Signature made Wed 20 Jul 2016 17:20:52 BST
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request: (25 commits)
raw_bsd: Convert to byte-based interface
nbd: Convert to byte-based interface
block: Kill .bdrv_co_discard()
sheepdog: Switch .bdrv_co_discard() to byte-based
raw_bsd: Switch .bdrv_co_discard() to byte-based
qcow2: Switch .bdrv_co_discard() to byte-based
nbd: Switch .bdrv_co_discard() to byte-based
iscsi: Switch .bdrv_co_discard() to byte-based
gluster: Switch .bdrv_co_discard() to byte-based
blkreplay: Switch .bdrv_co_discard() to byte-based
block: Add .bdrv_co_pdiscard() driver callback
block: Convert .bdrv_aio_discard() to byte-based
rbd: Switch rbd_start_aio() to byte-based
raw-posix: Switch paio_submit() to byte-based
block: Convert BB interface to byte-based discards
block: Convert bdrv_aio_discard() to byte-based
block: Switch BlockRequest to byte-based
block: Convert bdrv_discard() to byte-based
block: Convert bdrv_co_discard() to byte-based
iscsi: Rely on block layer to break up large requests
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Conflicts:
block/gluster.c
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/xen_disk.c | 7 | ||||
-rw-r--r-- | hw/ide/core.c | 6 | ||||
-rw-r--r-- | hw/scsi/scsi-disk.c | 8 |
3 files changed, 12 insertions, 9 deletions
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 90aca73121..3b8ad33fc5 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -574,9 +574,10 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq) { struct blkif_request_discard *discard_req = (void *)&ioreq->req; ioreq->aio_inflight++; - blk_aio_discard(blkdev->blk, - discard_req->sector_number, discard_req->nr_sectors, - qemu_aio_complete, ioreq); + blk_aio_pdiscard(blkdev->blk, + discard_req->sector_number << BDRV_SECTOR_BITS, + discard_req->nr_sectors << BDRV_SECTOR_BITS, + qemu_aio_complete, ioreq); break; } default: diff --git a/hw/ide/core.c b/hw/ide/core.c index b1daf967d6..081c9eb765 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -423,8 +423,10 @@ static void ide_issue_trim_cb(void *opaque, int ret) } /* Got an entry! Submit and exit. */ - iocb->aiocb = blk_aio_discard(iocb->blk, sector, count, - ide_issue_trim_cb, opaque); + iocb->aiocb = blk_aio_pdiscard(iocb->blk, + sector << BDRV_SECTOR_BITS, + count << BDRV_SECTOR_BITS, + ide_issue_trim_cb, opaque); return; } diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 8dbfc10b78..836a1553ed 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1609,10 +1609,10 @@ static void scsi_unmap_complete_noio(UnmapCBData *data, int ret) goto done; } - r->req.aiocb = blk_aio_discard(s->qdev.conf.blk, - sector_num * (s->qdev.blocksize / 512), - nb_sectors * (s->qdev.blocksize / 512), - scsi_unmap_complete, data); + r->req.aiocb = blk_aio_pdiscard(s->qdev.conf.blk, + sector_num * s->qdev.blocksize, + nb_sectors * s->qdev.blocksize, + scsi_unmap_complete, data); data->count--; data->inbuf += 16; return; |