target: remove an incorrect unmap zeroes data deduction
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Apr 2022 04:52:32 +0000 (06:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:47 +0000 (10:22 +0200)
commitae42074b409fcc6027990142f7790a390674ed95
tree77170e3fb6dbba0141298fdd38c9d8682853f9ad
parentc16539ef982c1a6e6d717310f4e6b6ab2be8c2a2
target: remove an incorrect unmap zeroes data deduction

[ Upstream commit 179d8609d8424529e95021df939ed7b0b82b37f1 ]

For block devices, the SCSI target drivers implements UNMAP as calls to
blkdev_issue_discard, which does not guarantee zeroing just because
Write Zeroes is supported.

Note that this does not affect the file backed path which uses
fallocate to punch holes.

Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220415045258.199825-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/target/target_core_device.c