Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-07-08 07:01:09 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-07-08 07:01:09 +0200
commit6e6d6da826ffa14d8bcadc039c5e652d9c756725 (patch)
treeadb22defca4fc8d12a35c763f7ce76b42e25e5fa
parentac57f1cad6c250eb1bad7117107355a317a641dc (diff)
parentd84c9bac26d4adec147be8970d78c9b7fd4c34be (diff)
Merge branch 'SLE15' into SLE15-AZURE
-rw-r--r--patches.fixes/scsi-target-iblock-fix-overrun-in-write-same-emulation42
-rw-r--r--patches.suse/dm-dax-fix-detection-of-dax-support.patch29
-rw-r--r--series.conf4
3 files changed, 75 insertions, 0 deletions
diff --git a/patches.fixes/scsi-target-iblock-fix-overrun-in-write-same-emulation b/patches.fixes/scsi-target-iblock-fix-overrun-in-write-same-emulation
new file mode 100644
index 0000000000..0f9a2b8bd7
--- /dev/null
+++ b/patches.fixes/scsi-target-iblock-fix-overrun-in-write-same-emulation
@@ -0,0 +1,42 @@
+From: Roman Bolshakov <r.bolshakov@yadro.com>
+Date: Tue, 2 Jul 2019 22:16:38 +0300
+Subject: scsi: target/iblock: Fix overrun in WRITE SAME emulation [Modified]
+Patch-mainline: Queued in subsystem maintainer repository
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
+Git-commit: 5676234f20fef02f6ca9bd66c63a8860fce62645
+References: bsc#1140424
+
+WRITE SAME corrupts data on the block device behind iblock if the command
+is emulated. The emulation code issues (M - 1) * N times more bios than
+requested, where M is the number of 512 blocks per real block size and N is
+the NUMBER OF LOGICAL BLOCKS specified in WRITE SAME command. So, for a
+device with 4k blocks, 7 * N more LBAs gets written after the requested
+range.
+
+The issue happens because the number of 512 byte sectors to be written is
+decreased one by one while the real bios are typically from 1 to 8 512 byte
+sectors per bio.
+
+[Note: modified to match our sources, but no change in functionality. -- lduncan]
+
+Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Lee Duncan <lduncan@suse.com>
+---
+ drivers/target/target_core_iblock.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/target/target_core_iblock.c
++++ b/drivers/target/target_core_iblock.c
+@@ -517,7 +517,7 @@ iblock_execute_write_same(struct se_cmd
+
+ /* Always in 512 byte units for Linux/Block */
+ block_lba += sg->length >> IBLOCK_LBA_SHIFT;
+- sectors -= 1;
++ sectors -= sg->length >> IBLOCK_LBA_SHIFT;
+ }
+
+ iblock_submit_bios(&list);
diff --git a/patches.suse/dm-dax-fix-detection-of-dax-support.patch b/patches.suse/dm-dax-fix-detection-of-dax-support.patch
new file mode 100644
index 0000000000..f80bef982e
--- /dev/null
+++ b/patches.suse/dm-dax-fix-detection-of-dax-support.patch
@@ -0,0 +1,29 @@
+From: Jan Kara <jack@suse.cz>
+Subject: dm, dax: Fix detection of DAX support
+References: bsc#1139782
+Patch-mainline: Never, upstream has 80660f2025 "dax: change bdev_dax_supported()
+ to support boolean returns"
+
+We do not have commit 80660f2025 "dax: change bdev_dax_supported() to support
+boolean returns" in SLE15 due to kABI. Thus return values of
+device_supports_dax() are effectively inverted. Fixup the check in
+dm_table_supports_dax() to count with this.
+
+Reported-by: Lidong Zhong <lidong.zhong@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+
+---
+ drivers/md/dm-table.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/md/dm-table.c
++++ b/drivers/md/dm-table.c
+@@ -899,7 +899,7 @@ static bool dm_table_supports_dax(struct
+ return false;
+
+ if (!ti->type->iterate_devices ||
+- !ti->type->iterate_devices(ti, device_supports_dax, NULL))
++ ti->type->iterate_devices(ti, device_supports_dax, NULL) < 0)
+ return false;
+ }
+
diff --git a/series.conf b/series.conf
index e08a460a8d..b0e7fc1e10 100644
--- a/series.conf
+++ b/series.conf
@@ -22839,6 +22839,9 @@
patches.suse/0005-MODSIGN-Allow-the-db-UEFI-variable-to-be-suppressed.patch
patches.suse/0006-modsign-Use-secondary-trust-keyring-for-module-signi.patch
+ # mkp/scsi fixes
+ patches.fixes/scsi-target-iblock-fix-overrun-in-write-same-emulation
+
# nvdimm/nvdimm libnvdimm-fixes
patches.fixes/drivers-base-introduce-kill_device.patch
patches.fixes/libnvdimm-bus-prevent-duplicate-device_unregister-calls.patch
@@ -23008,6 +23011,7 @@
patches.suse/mm-memory_hotplug-fix-scan_movable_pages-for-giganti.patch
patches.fixes/fs-dax-deposit-pagetable-even-when-installing-zero-page.patch
+ patches.suse/dm-dax-fix-detection-of-dax-support.patch
########################################################
# misc small fixes