summaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2020-02-19 14:01:35 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-21 17:37:13 -0500
commit738981bd74e89d5de012c56a20427e34c6937334 (patch)
tree63a7c20558931cdf7e58fc0a1068c55d5d4d18de /include/target
parentb417107a659e9745f9ff905196ddff70cbe4eaa7 (diff)
downloadlinux-738981bd74e89d5de012c56a20427e34c6937334.tar.bz2
scsi: target: fix unmap_zeroes_data boolean initialisation
The LIO unmap_zeroes_data device attribute is mapped to the LBPRZ flag in the READ CAPACITY(16) and Thin Provisioning VPD INQUIRY responses. The unmap_zeroes_data attribute is exposed via configfs, where any write value is correctly validated via strtobool(). However, when initialised via target_configure_unmap_from_queue() it takes the value of the device's max_write_zeroes_sectors queue limit, which is non-boolean. A non-boolean value can be read from configfs, but attempting to write the same value back results in -EINVAL, causing problems for configuration utilities such as targetcli. Link: https://marc.info/?l=target-devel&m=158213354011309 Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout") Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 1728e883b7b2..35188e64239e 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -682,7 +682,7 @@ struct se_dev_attrib {
int force_pr_aptpl;
int is_nonrot;
int emulate_rest_reord;
- int unmap_zeroes_data;
+ bool unmap_zeroes_data;
u32 hw_block_size;
u32 block_size;
u32 hw_max_sectors;