Accepting request 1056343 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1056343 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=102
This commit is contained in:
commit
1ec504acc4
@ -1,107 +0,0 @@
|
||||
/* {"version":"v5.15-rc1~45", "commit": "1b7646014e0d838b06be7288e2dec3262948cc56", "comment": "dax: mark dax_get_by_host static"} */
|
||||
|
||||
diff -Naru drbd-9.0.30~1+git.8e9c0812.orig/drbd/Kbuild drbd-9.0.30~1+git.8e9c0812/drbd/Kbuild
|
||||
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/Kbuild 2021-11-22 10:12:32.660034839 +0800
|
||||
+++ drbd-9.0.30~1+git.8e9c0812/drbd/Kbuild 2021-11-22 10:15:26.327117285 +0800
|
||||
@@ -53,6 +53,11 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifeq ($(shell grep -e '\<dax_get_by_host\>' \
|
||||
+ $(objtree)/Module.symvers | wc -l),1)
|
||||
+override EXTRA_CFLAGS += -DDAX_GET_BY_HOST_EXPORTED
|
||||
+endif
|
||||
+
|
||||
drbd-$(CONFIG_DEBUG_FS) += drbd_debugfs.o
|
||||
drbd-y += drbd_buildtag.o drbd_bitmap.o drbd_proc.o
|
||||
drbd-y += drbd_sender.o drbd_receiver.o drbd_req.o drbd_actlog.o
|
||||
diff -Naru drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_dax_pmem.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd_dax_pmem.c
|
||||
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_dax_pmem.c 2021-11-22 10:12:32.668034796 +0800
|
||||
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd_dax_pmem.c 2021-11-22 10:32:04.933864379 +0800
|
||||
@@ -29,6 +29,53 @@
|
||||
#include "drbd_dax_pmem.h"
|
||||
#include "drbd_meta_data.h"
|
||||
|
||||
+#ifndef DAX_GET_BY_HOST_EXPORTED
|
||||
+/* From drivers/dax/super.c */
|
||||
+#include <linux/fs.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/radix-tree.h>
|
||||
+
|
||||
+#define DAX_HASH_SIZE (PAGE_SIZE / sizeof(struct hlist_head))
|
||||
+static DEFINE_SPINLOCK(dax_host_lock);
|
||||
+static struct hlist_head dax_host_list[DAX_HASH_SIZE];
|
||||
+
|
||||
+static int dax_host_hash(const char *host)
|
||||
+{
|
||||
+ return hashlen_hash(hashlen_string("DAX", host)) % DAX_HASH_SIZE;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * dax_get_by_host() - temporary lookup mechanism for filesystem-dax
|
||||
+ * @host: alternate name for the device registered by a dax driver
|
||||
+ */
|
||||
+struct dax_device *dax_get_by_host(const char *host)
|
||||
+{
|
||||
+ struct dax_device *dax_dev, *found = NULL;
|
||||
+ int hash, id;
|
||||
+
|
||||
+ if (!host)
|
||||
+ return NULL;
|
||||
+
|
||||
+ hash = dax_host_hash(host);
|
||||
+
|
||||
+ id = dax_read_lock();
|
||||
+ spin_lock(&dax_host_lock);
|
||||
+ hlist_for_each_entry(dax_dev, &dax_host_list[hash], list) {
|
||||
+ if (!dax_alive(dax_dev)
|
||||
+ || strcmp(host, dax_dev->host) != 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (igrab(&dax_dev->inode))
|
||||
+ found = dax_dev;
|
||||
+ break;
|
||||
+ }
|
||||
+ spin_unlock(&dax_host_lock);
|
||||
+ dax_read_unlock(id);
|
||||
+
|
||||
+ return found;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int map_superblock_for_dax(struct drbd_backing_dev *bdev, struct dax_device *dax_dev)
|
||||
{
|
||||
long want = 1;
|
||||
diff -Naru drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_dax_pmem.h drbd-9.0.30~1+git.8e9c0812/drbd/drbd_dax_pmem.h
|
||||
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_dax_pmem.h 2021-11-22 10:12:32.668034796 +0800
|
||||
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd_dax_pmem.h 2021-11-22 10:32:22.449772726 +0800
|
||||
@@ -36,4 +36,29 @@
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_DEV_DAX_PMEM) */
|
||||
|
||||
+#ifndef DAX_GET_BY_HOST_EXPORTED
|
||||
+#include <linux/cdev.h>
|
||||
+/**
|
||||
+ * struct dax_device - anchor object for dax services
|
||||
+ * @inode: core vfs
|
||||
+ * @cdev: optional character interface for "device dax"
|
||||
+ * @host: optional name for lookups where the device path is not available
|
||||
+ * @private: dax driver private data
|
||||
+ * @flags: state and boolean properties
|
||||
+ */
|
||||
+struct dax_device {
|
||||
+ struct hlist_node list;
|
||||
+ struct inode inode;
|
||||
+ struct cdev cdev;
|
||||
+ const char *host;
|
||||
+ void *private;
|
||||
+ unsigned long flags;
|
||||
+ const struct dax_operations *ops;
|
||||
+};
|
||||
+
|
||||
+#define DAX_HASH_SIZE (PAGE_SIZE / sizeof(struct hlist_head))
|
||||
+
|
||||
+extern struct dax_device *dax_get_by_host(const char *);
|
||||
+#endif
|
||||
+
|
||||
#endif /* DRBD_DAX_H */
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 6 01:40:00 UTC 2023 - Heming Zhao <heming.zhao@suse.com>
|
||||
|
||||
- remove useless patch, dax_get_by_host() was replaced by fs_dax_get_by_bdev()
|
||||
* bsc-1192929_06-dax_support.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 11:13:00 UTC 2023 - Heming Zhao <heming.zhao@suse.com>
|
||||
|
||||
|
56
drbd.spec
56
drbd.spec
@ -39,33 +39,32 @@ Patch2: bsc-1192929_01-make_block_holder_optional.patch
|
||||
Patch3: bsc-1192929_02-move_kvmalloc_related_to_slab.patch
|
||||
Patch4: bsc-1192929_03-polling_to_bio_base.patch
|
||||
Patch5: bsc-1192929_04-pass_gend_to_blk_queue_update_readahead.patch
|
||||
Patch6: bsc-1192929_06-dax_support.patch
|
||||
Patch7: bsc-1192929_07-add_disk_error_handle.patch
|
||||
Patch8: bsc-1192929_08-have_void_drbd_submit_bio.patch
|
||||
Patch9: bsc-1192929_09-remove_bdgrab.patch
|
||||
Patch10: bsc-1201335_01-compat-test-and-cocci-patch-for-bdi-in-gendisk.patch
|
||||
Patch11: bsc-1201335_02-compat-only-apply-bdi-pointer-patch-if-bdi-is-in-req.patch
|
||||
Patch12: bsc-1201335_03-genhd.patch
|
||||
Patch13: bsc-1201335_04-bio_alloc_bioset.patch
|
||||
Patch14: bsc-1201335_05-bio_alloc.patch
|
||||
Patch15: bsc-1201335_06-bdi.patch
|
||||
Patch16: bsc-1201335_07-write-same.patch
|
||||
Patch17: bsc-1201335_08-bio_clone_fast.patch
|
||||
Patch18: bsc-1202600_01-remove-QUEUE_FLAG_DISCARD.patch
|
||||
Patch19: bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch
|
||||
Patch20: bsc-1202600_03-block-decouple-REQ_OP_SECURE_ERASE-from-REQ_OP_DISCA.patch
|
||||
Patch21: bsc-1202600_04-remove-assign_p_sizes_qlim.patch
|
||||
Patch22: bsc-1204596_01-block-remove-blk_cleanup_disk.patch
|
||||
Patch23: bsc-1204596_02-drbd-remove-usage-of-bdevname.patch
|
||||
Patch24: bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch
|
||||
Patch25: bsc-1206791-02-drbd-fix-static-analysis-warnings.patch
|
||||
Patch26: bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch
|
||||
Patch27: bsc-1206791-04-blk_queue_split__no_present.patch
|
||||
Patch28: bsc-1206791-05-prandom_u32_max.patch
|
||||
Patch29: bsc-1206791-06-write_zeroes__no_capable.patch
|
||||
Patch30: bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch
|
||||
Patch31: bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch
|
||||
Patch32: bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch
|
||||
Patch6: bsc-1192929_07-add_disk_error_handle.patch
|
||||
Patch7: bsc-1192929_08-have_void_drbd_submit_bio.patch
|
||||
Patch8: bsc-1192929_09-remove_bdgrab.patch
|
||||
Patch9: bsc-1201335_01-compat-test-and-cocci-patch-for-bdi-in-gendisk.patch
|
||||
Patch10: bsc-1201335_02-compat-only-apply-bdi-pointer-patch-if-bdi-is-in-req.patch
|
||||
Patch11: bsc-1201335_03-genhd.patch
|
||||
Patch12: bsc-1201335_04-bio_alloc_bioset.patch
|
||||
Patch13: bsc-1201335_05-bio_alloc.patch
|
||||
Patch14: bsc-1201335_06-bdi.patch
|
||||
Patch15: bsc-1201335_07-write-same.patch
|
||||
Patch16: bsc-1201335_08-bio_clone_fast.patch
|
||||
Patch17: bsc-1202600_01-remove-QUEUE_FLAG_DISCARD.patch
|
||||
Patch18: bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch
|
||||
Patch19: bsc-1202600_03-block-decouple-REQ_OP_SECURE_ERASE-from-REQ_OP_DISCA.patch
|
||||
Patch20: bsc-1202600_04-remove-assign_p_sizes_qlim.patch
|
||||
Patch21: bsc-1204596_01-block-remove-blk_cleanup_disk.patch
|
||||
Patch22: bsc-1204596_02-drbd-remove-usage-of-bdevname.patch
|
||||
Patch23: bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch
|
||||
Patch24: bsc-1206791-02-drbd-fix-static-analysis-warnings.patch
|
||||
Patch25: bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch
|
||||
Patch26: bsc-1206791-04-blk_queue_split__no_present.patch
|
||||
Patch27: bsc-1206791-05-prandom_u32_max.patch
|
||||
Patch28: bsc-1206791-06-write_zeroes__no_capable.patch
|
||||
Patch29: bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch
|
||||
Patch30: bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch
|
||||
Patch31: bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch
|
||||
Patch99: suse-coccinelle.patch
|
||||
#https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py
|
||||
BuildRequires: coccinelle >= 1.0.8
|
||||
@ -105,7 +104,7 @@ installed kernel.
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
#%patch6 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
@ -131,7 +130,6 @@ installed kernel.
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch99 -p1
|
||||
|
||||
mkdir source
|
||||
|
Loading…
Reference in New Issue
Block a user