8cb897e5f9
- drbd: build error against kernel v5.19 (bsc#1202600) - add patch: + bsc-1202600_01-remove-QUEUE_FLAG_DISCARD.patch + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch + bsc-1202600_03-block-decouple-REQ_OP_SECURE_ERASE-from-REQ_OP_DISCA.patch + bsc-1202600_04-remove-assign_p_sizes_qlim.patch - For rpmbuild warning, modify symlink /usr/sbin/rcdrbd to relative path + drbd.spec OBS-URL: https://build.opensuse.org/request/show/998745 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=139
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
|
|
@@ -86,7 +86,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)
|
|
@@ -147,7 +147,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)
|