From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: David Disseldorp <ddiss@suse.de>,
Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Sasha Levin <sashal@kernel.org>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 06/20] scsi: target/iblock: fix WRITE SAME zeroing
Date: Thu, 7 May 2020 10:29:02 -0400 [thread overview]
Message-ID: <20200507142917.26612-6-sashal@kernel.org> (raw)
In-Reply-To: <20200507142917.26612-1-sashal@kernel.org>
From: David Disseldorp <ddiss@suse.de>
[ Upstream commit 1d2ff149b263c9325875726a7804a0c75ef7112e ]
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". Commit 2237498f0b5c ("target/iblock: Convert WRITE_SAME to
blkdev_issue_zeroout") 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 commit
ee472d835c26 ("block: add a flags argument to (__)blkdev_issue_zeroout")
which was merged shortly before 2237498f0b5c.
Link: https://lore.kernel.org/r/20200419163109.11689-1-ddiss@suse.de
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 854b2bcca7c1a..5668d02de10b0 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -445,7 +445,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.20.1
next prev parent reply other threads:[~2020-05-07 14:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 14:28 [PATCH AUTOSEL 4.19 01/20] RDMA/mlx4: Initialize ib_spec on the stack Sasha Levin
2020-05-07 14:28 ` [PATCH AUTOSEL 4.19 02/20] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl Sasha Levin
2020-05-07 14:28 ` [PATCH AUTOSEL 4.19 03/20] vfio: avoid possible overflow in vfio_iommu_type1_pin_pages Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 04/20] riscv: fix vdso build with lld Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 05/20] scsi: qla2xxx: check UNLOADING before posting async work Sasha Levin
2020-05-07 14:29 ` Sasha Levin [this message]
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 07/20] RDMA/mlx5: Set GRH fields in query QP on RoCE Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 08/20] RDMA/core: Prevent mixed use of FDs between shared ufiles Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 09/20] dmaengine: pch_dma.c: Avoid data race between probe and irq handler Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 10/20] dmaengine: mmp_tdma: Reset channel error on release Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 11/20] vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn() Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 12/20] ALSA: hda: Match both PCI ID and SSID for driver blacklist Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 13/20] RDMA/core: Fix race between destroy and release FD object Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 14/20] cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 15/20] dmaengine: dmatest: Fix iteration non-stop logic Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 16/20] ALSA: hda/hdmi: fix race in monitor detection during probe Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 17/20] drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper() Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 18/20] ALSA: opti9xx: shut up gcc-10 range warning Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 19/20] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system Sasha Levin
2020-05-07 14:29 ` [PATCH AUTOSEL 4.19 20/20] iommu/qcom: Fix local_base status check Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200507142917.26612-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bvanassche@acm.org \
--cc=ddiss@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).