]> www.infradead.org Git - users/willy/linux.git/commit
virtio_blk: add discard and write zeroes support
authorChangpeng Liu <changpeng.liu@intel.com>
Fri, 12 Oct 2018 21:06:28 +0000 (14:06 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 6 Dec 2018 19:28:38 +0000 (14:28 -0500)
commita4da43197e559cfab0a8c0d6ab8b8ef0b6936130
tree76a9f153d8acb6dd8e4b957ff231d0807a50c21d
parent834e772c8db0c6a275d75315d90aba4ebbb1e249
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>
drivers/block/virtio_blk.c
include/uapi/linux/virtio_blk.h