[Devel] [PATCH RHEL7 COMMIT] ms/target/sbc: Add LBPRZ attribute + control CDB emulation
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Apr 2 17:28:25 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.46.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.46.2
------>
commit 6670637e00d204e25c3d7b67f022b825d93520e4
Author: Jamie Pocas <jamie.pocas at emc.com>
Date: Mon Apr 2 17:28:24 2018 +0300
ms/target/sbc: Add LBPRZ attribute + control CDB emulation
ML: e6f41633cb79b55ead84b023c02035322c7827e7
This change sets the LBPRZ flag in EVPD page b2h and READ CAPACITY (16)
based on a new unmap_zeroes_data device attribute. This flag is set
automatically for iblock based on underlying block device queue's
discard_zeroes_data flag.
Signed-off-by: Jamie Pocas <jamie.pocas at emc.com>
Signed-off-by: Nicholas Bellinger <nab at linux-iscsi.org>
Signed-off-by: Andrei Vagin <avagin at openvz.org>
---
drivers/target/target_core_iblock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index c68e2555edf4..02c5ab0a56e8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -144,6 +144,8 @@ static int iblock_configure_device(struct se_device *dev)
q->limits.discard_granularity >> 9;
dev->dev_attrib.unmap_granularity_alignment =
q->limits.discard_alignment;
+ dev->dev_attrib.unmap_zeroes_data =
+ q->limits.discard_zeroes_data;
pr_debug("IBLOCK: BLOCK Discard support available,"
" disabled by default\n");
More information about the Devel
mailing list