diff --git a/patches.suse/bcache-use-bvec_kmap_local-in-bio_csum-07fe.patch b/patches.suse/bcache-use-bvec_kmap_local-in-bio_csum-07fe.patch new file mode 100644 index 0000000..0d83619 --- /dev/null +++ b/patches.suse/bcache-use-bvec_kmap_local-in-bio_csum-07fe.patch @@ -0,0 +1,41 @@ +From 07fee7aba5472d0e65345146a68b4bd1a8b656c3 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Thu, 3 Mar 2022 14:19:02 +0300 +Subject: [PATCH] bcache: use bvec_kmap_local in bio_csum +Git-commit: 07fee7aba5472d0e65345146a68b4bd1a8b656c3 +Patch-mainline: v5.18-rc1 +References: git-fixes + +Using local kmaps slightly reduces the chances to stray writes, and +the bvec interface cleans up the code a little bit. + +Signed-off-by: Christoph Hellwig +Reviewed-by: Ira Weiny +Link: https://lore.kernel.org/r/20220303111905.321089-8-hch@lst.de +Signed-off-by: Jens Axboe +Signed-off-by: Coly Li + +--- + drivers/md/bcache/request.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c +index 6869e010475a..fdd0194f84dd 100644 +--- a/drivers/md/bcache/request.c ++++ b/drivers/md/bcache/request.c +@@ -44,10 +44,10 @@ static void bio_csum(struct bio *bio, struct bkey *k) + uint64_t csum = 0; + + bio_for_each_segment(bv, bio, iter) { +- void *d = kmap(bv.bv_page) + bv.bv_offset; ++ void *d = bvec_kmap_local(&bv); + + csum = crc64_be(csum, d, bv.bv_len); +- kunmap(bv.bv_page); ++ kunmap_local(d); + } + + k->ptr[KEY_PTRS(k)] = csum & (~0ULL >> 1); +-- +2.35.3 + diff --git a/series.conf b/series.conf index 0b927d4..ef87dd5 100644 --- a/series.conf +++ b/series.conf @@ -19257,6 +19257,7 @@ patches.suse/nvme-fix-the-check-for-duplicate-unique-identifiers.patch patches.suse/nvme-check-for-duplicate-identifiers-earlier.patch patches.suse/nvme-check-that-EUI-GUID-UUID-are-globally-unique.patch + patches.suse/bcache-use-bvec_kmap_local-in-bio_csum-07fe.patch patches.suse/0003-bcache-fixup-multiple-threads-crash.patch patches.suse/0055-md-raid1-raid10-drop-pending_cnt.patch patches.suse/lib-raid6-test-fix-multiple-definition-linking-error.patch