Commit b3f8fce9 authored by Changpeng Liu's avatar Changpeng Liu Committed by Cheng Jian
Browse files

virtio_blk: add discard and write zeroes support

mainline inclusion
from mainline-5.14-rc7
commit 1f23816b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I47ITN
CVE: NA

-------------------------------------------------

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: default avatarChangpeng Liu <changpeng.liu@intel.com>
Signed-off-by: default avatarDaniel Verkamp <dverkamp@chromium.org>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: xuliqun <xuliqun@huayun.com>		# openEuler_contributor
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 24867263
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment