]> git.ipfire.org Git - thirdparty/qemu.git/commit - qemu-io-cmds.c
block: Convert BB interface to byte-based discards
authorEric Blake <eblake@redhat.com>
Fri, 15 Jul 2016 23:22:54 +0000 (17:22 -0600)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 20 Jul 2016 13:11:55 +0000 (14:11 +0100)
commit1c6c4bb7f0a4cc3987e58880ef96159985dc1228
tree701615001a4bdce0a17e1d892c127da44ad21d8e
parent60ebac16bca3e3bf07c7ae67a69a7730aaa48712
block: Convert BB interface to byte-based discards

Change sector-based blk_discard(), blk_co_discard(), and
blk_aio_discard() to instead be byte-based blk_pdiscard(),
blk_co_pdiscard(), and blk_aio_pdiscard().  NBD gets a lot
simpler now that ignoring the unaligned portion of a
byte-based discard request is handled under the hood by
the block layer.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1468624988-423-6-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/block-backend.c
block/mirror.c
hw/block/xen_disk.c
hw/ide/core.c
hw/scsi/scsi-disk.c
include/sysemu/block-backend.h
nbd/server.c
qemu-io-cmds.c