All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
@ 2020-04-19 16:31 ` David Disseldorp
  0 siblings, 0 replies; 6+ messages in thread
From: David Disseldorp @ 2020-04-19 16:31 UTC (permalink / raw)
  To: target-devel; +Cc: linux-scsi, martin.petersen, bvanassche, David Disseldorp

SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
"shall perform the specified write operation to each LBA specified by
the command".
2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
The iblock blkdev_issue_zeroout() call incorrectly provides a flags
parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
false parameter reflects the blkdev_issue_zeroout() API prior to
ee472d835c264, which was merged shortly before 2237498f0b5c.

Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout")
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_iblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 51ffd5c002de..1c181d31f4c8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -432,7 +432,7 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
 				target_to_linux_sector(dev, cmd->t_task_lba),
 				target_to_linux_sector(dev,
 					sbc_get_write_same_sectors(cmd)),
-				GFP_KERNEL, false);
+				GFP_KERNEL, BLKDEV_ZERO_NOUNMAP);
 	if (ret)
 		return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
@ 2020-04-19 16:31 ` David Disseldorp
  0 siblings, 0 replies; 6+ messages in thread
From: David Disseldorp @ 2020-04-19 16:31 UTC (permalink / raw)
  To: target-devel; +Cc: linux-scsi, martin.petersen, bvanassche, David Disseldorp

SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
"shall perform the specified write operation to each LBA specified by
the command".
2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
The iblock blkdev_issue_zeroout() call incorrectly provides a flags
parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
false parameter reflects the blkdev_issue_zeroout() API prior to
ee472d835c264, which was merged shortly before 2237498f0b5c.

Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout")
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_iblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 51ffd5c002de..1c181d31f4c8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -432,7 +432,7 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
 				target_to_linux_sector(dev, cmd->t_task_lba),
 				target_to_linux_sector(dev,
 					sbc_get_write_same_sectors(cmd)),
-				GFP_KERNEL, false);
+				GFP_KERNEL, BLKDEV_ZERO_NOUNMAP);
 	if (ret)
 		return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
  2020-04-19 16:31 ` David Disseldorp
@ 2020-04-19 23:45   ` Bart Van Assche
  -1 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2020-04-19 23:45 UTC (permalink / raw)
  To: David Disseldorp, target-devel; +Cc: linux-scsi, martin.petersen

On 4/19/20 9:31 AM, David Disseldorp wrote:
> SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
> "shall perform the specified write operation to each LBA specified by
> the command".
> 2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
> when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
> The iblock blkdev_issue_zeroout() call incorrectly provides a flags
> parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
> false parameter reflects the blkdev_issue_zeroout() API prior to
> ee472d835c264, which was merged shortly before 2237498f0b5c.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
@ 2020-04-19 23:45   ` Bart Van Assche
  0 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2020-04-19 23:45 UTC (permalink / raw)
  To: David Disseldorp, target-devel; +Cc: linux-scsi, martin.petersen

On 4/19/20 9:31 AM, David Disseldorp wrote:
> SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
> "shall perform the specified write operation to each LBA specified by
> the command".
> 2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
> when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
> The iblock blkdev_issue_zeroout() call incorrectly provides a flags
> parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
> false parameter reflects the blkdev_issue_zeroout() API prior to
> ee472d835c264, which was merged shortly before 2237498f0b5c.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
  2020-04-19 16:31 ` David Disseldorp
@ 2020-04-22  4:02   ` Martin K. Petersen
  -1 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2020-04-22  4:02 UTC (permalink / raw)
  To: David Disseldorp; +Cc: target-devel, linux-scsi, martin.petersen, bvanassche


David,

> SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
> "shall perform the specified write operation to each LBA specified by
> the command".
> 2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
> when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
> The iblock blkdev_issue_zeroout() call incorrectly provides a flags
> parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
> false parameter reflects the blkdev_issue_zeroout() API prior to
> ee472d835c264, which was merged shortly before 2237498f0b5c.

Applied to 5.7/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] scsi: target/iblock: fix WRITE SAME zeroing
@ 2020-04-22  4:02   ` Martin K. Petersen
  0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2020-04-22  4:02 UTC (permalink / raw)
  To: David Disseldorp; +Cc: target-devel, linux-scsi, martin.petersen, bvanassche


David,

> SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero
> "shall perform the specified write operation to each LBA specified by
> the command".
> 2237498f0b5c modified the iblock backend to call blkdev_issue_zeroout()
> when handling WRITE SAME requests with UNMAP=0 and a zero data segment.
> The iblock blkdev_issue_zeroout() call incorrectly provides a flags
> parameter of 0 (bool false), instead of BLKDEV_ZERO_NOUNMAP. The bool
> false parameter reflects the blkdev_issue_zeroout() API prior to
> ee472d835c264, which was merged shortly before 2237498f0b5c.

Applied to 5.7/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-22  4:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19 16:31 [PATCH] scsi: target/iblock: fix WRITE SAME zeroing David Disseldorp
2020-04-19 16:31 ` David Disseldorp
2020-04-19 23:45 ` Bart Van Assche
2020-04-19 23:45   ` Bart Van Assche
2020-04-22  4:02 ` Martin K. Petersen
2020-04-22  4:02   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.