4e5f7cbf78
- drbd: fix build error against kernel v6.1.1 (bsc#1206791) * update bsc-1201335_06-bdi.patch commit log (no code change) + bsc-1201335_06-bdi.patch * update bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch (no code change) + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch * using upstream patch to replace exist patch - bsc-1204596_02-drbd-stop-using-bdevname-in-drbd_report_io_error.patch + bsc-1204596_02-drbd-remove-usage-of-bdevname.patch * add new patches + bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch + bsc-1206791-02-drbd-fix-static-analysis-warnings.patch + bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch + bsc-1206791-04-blk_queue_split__no_present.patch + bsc-1206791-05-prandom_u32_max.patch + bsc-1206791-06-write_zeroes__no_capable.patch + bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch + bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch + bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch OBS-URL: https://build.opensuse.org/request/show/1056192 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=142
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
/* This patch is related with following upstream kernel commit. */
|
|
|
|
From e511c4a3d2a1f64aafc1f5df37a2ffcf7ef91b55 Mon Sep 17 00:00:00 2001
|
|
From: Jane Chu <jane.chu@oracle.com>
|
|
Date: Fri, 13 May 2022 15:10:58 -0700
|
|
Subject: [PATCH] dax: introduce DAX_RECOVERY_WRITE dax access mode
|
|
|
|
Up till now, dax_direct_access() is used implicitly for normal
|
|
access, but for the purpose of recovery write, dax range with
|
|
poison is requested. To make the interface clear, introduce
|
|
enum dax_access_mode {
|
|
DAX_ACCESS,
|
|
DAX_RECOVERY_WRITE,
|
|
}
|
|
where DAX_ACCESS is used for normal dax access, and
|
|
DAX_RECOVERY_WRITE is used for dax recovery write.
|
|
|
|
Suggested-by: Dan Williams <dan.j.williams@intel.com>
|
|
Signed-off-by: Jane Chu <jane.chu@oracle.com>
|
|
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
Cc: Mike Snitzer <snitzer@redhat.com>
|
|
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
|
|
Link: https://lore.kernel.org/r/165247982851.52965.11024212198889762949.stgit@dwillia2-desk3.amr.corp.intel.com
|
|
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
---
|
|
|
|
diff -Nupr a/drbd/drbd_dax_pmem.c b/drbd/drbd_dax_pmem.c
|
|
--- a/drbd/drbd_dax_pmem.c 2022-08-22 16:26:24.786369807 +0800
|
|
+++ b/drbd/drbd_dax_pmem.c 2022-08-22 16:26:47.706276429 +0800
|
|
@@ -39,7 +39,7 @@ static int map_superblock_for_dax(struct
|
|
int id;
|
|
|
|
id = dax_read_lock();
|
|
- len = dax_direct_access(dax_dev, pgoff, want, &kaddr, &pfn_unused);
|
|
+ len = dax_direct_access(dax_dev, pgoff, want, DAX_ACCESS, &kaddr, &pfn_unused);
|
|
dax_read_unlock(id);
|
|
|
|
if (len < want)
|
|
@@ -100,7 +100,7 @@ int drbd_dax_map(struct drbd_backing_dev
|
|
int id;
|
|
|
|
id = dax_read_lock();
|
|
- len = dax_direct_access(dax_dev, pgoff, want, &kaddr, &pfn_unused);
|
|
+ len = dax_direct_access(dax_dev, pgoff, want, DAX_ACCESS, &kaddr, &pfn_unused);
|
|
dax_read_unlock(id);
|
|
|
|
if (len < want)
|