]> asedeno.scripts.mit.edu Git - linux.git/commit
virtio_blk: add discard and write zeroes support
authorChangpeng Liu <changpeng.liu@intel.com>
Thu, 1 Nov 2018 22:40:35 +0000 (15:40 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 19 Dec 2018 23:23:49 +0000 (18:23 -0500)
commit1f23816b8eb8fdc39990abe166c10a18c16f6b21
treea99e7e4494785aac1277f1848a9db07c443d4812
parentc5c08bed843c2b2c048c16d1296d7631d7c1620e
virtio_blk: add discard and write zeroes support

In commit 88c85538, "virtio-blk: add discard and write zeroes features
to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio
block specification has been extended to add VIRTIO_BLK_T_DISCARD and
VIRTIO_BLK_T_WRITE_ZEROES commands.  This patch enables support for
discard and write zeroes in the virtio-blk driver when the device
advertises the corresponding features, VIRTIO_BLK_F_DISCARD and
VIRTIO_BLK_F_WRITE_ZEROES.

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
drivers/block/virtio_blk.c
include/uapi/linux/virtio_blk.h