basebuilder_pel7ppc64lebuilder0
4 years ago
6 changed files with 316 additions and 7 deletions
@ -0,0 +1,140 @@
@@ -0,0 +1,140 @@
|
||||
diff -uprN ndctl-65.orig/Documentation/daxctl/Makefile.am ndctl-65/Documentation/daxctl/Makefile.am |
||||
--- ndctl-65.orig/Documentation/daxctl/Makefile.am 2019-07-29 14:41:44.474017128 -0400 |
||||
+++ ndctl-65/Documentation/daxctl/Makefile.am 2019-07-29 14:53:17.934283220 -0400 |
||||
@@ -27,8 +27,7 @@ endif |
||||
|
||||
man1_MANS = \ |
||||
daxctl.1 \ |
||||
- daxctl-list.1 \ |
||||
- daxctl-migrate-device-model.1 |
||||
+ daxctl-list.1 |
||||
|
||||
CLEANFILES = $(man1_MANS) |
||||
|
||||
diff -uprN ndctl-65.orig/Documentation/daxctl/daxctl-migrate-device-model.txt ndctl-65/Documentation/daxctl/daxctl-migrate-device-model.txt |
||||
--- ndctl-65.orig/Documentation/daxctl/daxctl-migrate-device-model.txt 2019-07-29 14:41:44.473017124 -0400 |
||||
+++ ndctl-65/Documentation/daxctl/daxctl-migrate-device-model.txt 1969-12-31 19:00:00.000000000 -0500 |
||||
@@ -1,47 +0,0 @@ |
||||
-// SPDX-License-Identifier: GPL-2.0 |
||||
- |
||||
-daxctl-migrate-device-model(1) |
||||
-============================== |
||||
- |
||||
-NAME |
||||
----- |
||||
-daxctl-migrate-device-model - Opt-in to the /sys/bus/dax device-model, |
||||
-allow for alternative Device-DAX instance drivers. |
||||
- |
||||
-SYNOPSIS |
||||
--------- |
||||
-[verse] |
||||
-'daxctl migrate-device-model' |
||||
- |
||||
-Arrange for modprobe to disable the dax_pmem_compat, if present, and |
||||
-instead deploy the dax_pmem module to convert to the /sys/bus/dax model. |
||||
-Kernel versions prior to v5.1 may not support /sys/bus/dax in which case |
||||
-the result of this command is a nop until the kernel is updated. The |
||||
-motivation for changing from /sys/class/dax to /sys/bus/dax is to allow |
||||
-for alternative drivers for Device-DAX instances, in particular the |
||||
-dax_kmem driver. |
||||
- |
||||
-By default device-dax publishes a /dev/daxX.Y character device for |
||||
-userspace to directly map performance differentiated memory. This is |
||||
-fine if the memory is to be exclusively consumed / managed by userspace. |
||||
-Alternatively an administrator may want the kernel to manage the memory, |
||||
-make it available via malloc(), allow for over-provisioning, and / or |
||||
-apply kernel-based resource control schemes to the memory. In that case |
||||
-the memory fronted by a given Device-DAX instance can be assigned to the |
||||
-dax_kmem driver which arranges for the core-kernel memory-management |
||||
-sub-system to assume management of the memory range. |
||||
- |
||||
-This behavior is opt-in for consideration of existing applications / |
||||
-scripts that may be hard coded to use /sys/class/dax. Fixes have been |
||||
-submitted to applications known to have these direct dependencies |
||||
-http://git.kernel.dk/cgit/fio/commit/?id=b08e7d6b18b4[FIO] |
||||
-https://github.com/pmem/pmdk/commit/91bc8620884e[PMDK], however, there may |
||||
-be others and a system-owner should be aware of the potential for |
||||
-regression of Device-DAX consuming scripts, applications, or older |
||||
-daxctl binaries. |
||||
- |
||||
-The modprobe policy established by this utility becomes effective after |
||||
-the next reboot, or after all DAX related modules have been removed and |
||||
-re-loaded with "udevadm trigger" |
||||
- |
||||
-include::../copyright.txt[] |
||||
diff -uprN ndctl-65.orig/daxctl/Makefile.am ndctl-65/daxctl/Makefile.am |
||||
--- ndctl-65.orig/daxctl/Makefile.am 2019-07-29 14:41:44.486017168 -0400 |
||||
+++ ndctl-65/daxctl/Makefile.am 2019-07-29 14:53:10.288257995 -0400 |
||||
@@ -14,7 +14,6 @@ config.h: $(srcdir)/Makefile.am |
||||
daxctl_SOURCES =\ |
||||
daxctl.c \ |
||||
list.c \ |
||||
- migrate.c \ |
||||
../util/json.c |
||||
|
||||
daxctl_LDADD =\ |
||||
diff -uprN ndctl-65.orig/daxctl/builtin.h ndctl-65/daxctl/builtin.h |
||||
--- ndctl-65.orig/daxctl/builtin.h 2019-07-29 14:41:44.486017168 -0400 |
||||
+++ ndctl-65/daxctl/builtin.h 2019-07-29 14:53:10.288257995 -0400 |
||||
@@ -5,5 +5,4 @@ |
||||
|
||||
struct daxctl_ctx; |
||||
int cmd_list(int argc, const char **argv, struct daxctl_ctx *ctx); |
||||
-int cmd_migrate(int argc, const char **argv, struct daxctl_ctx *ctx); |
||||
#endif /* _DAXCTL_BUILTIN_H_ */ |
||||
diff -uprN ndctl-65.orig/daxctl/daxctl.c ndctl-65/daxctl/daxctl.c |
||||
--- ndctl-65.orig/daxctl/daxctl.c 2019-07-29 14:41:44.486017168 -0400 |
||||
+++ ndctl-65/daxctl/daxctl.c 2019-07-29 14:53:10.288257995 -0400 |
||||
@@ -70,7 +70,6 @@ static struct cmd_struct commands[] = { |
||||
{ "version", .d_fn = cmd_version }, |
||||
{ "list", .d_fn = cmd_list }, |
||||
{ "help", .d_fn = cmd_help }, |
||||
- { "migrate-device-model", .d_fn = cmd_migrate }, |
||||
}; |
||||
|
||||
int main(int argc, const char **argv) |
||||
diff -uprN ndctl-65.orig/daxctl/migrate.c ndctl-65/daxctl/migrate.c |
||||
--- ndctl-65.orig/daxctl/migrate.c 2019-07-29 14:41:44.487017171 -0400 |
||||
+++ ndctl-65/daxctl/migrate.c 1969-12-31 19:00:00.000000000 -0500 |
||||
@@ -1,41 +0,0 @@ |
||||
-/* SPDX-License-Identifier: GPL-2.0 */ |
||||
-/* Copyright(c) 2019 Intel Corporation. All rights reserved. */ |
||||
-#include <sys/types.h> |
||||
-#include <sys/stat.h> |
||||
-#include <stdio.h> |
||||
-#include <errno.h> |
||||
-#include <fcntl.h> |
||||
-#include <daxctl/config.h> |
||||
-#include <daxctl/libdaxctl.h> |
||||
-#include <util/parse-options.h> |
||||
-#include <ccan/array_size/array_size.h> |
||||
- |
||||
-int cmd_migrate(int argc, const char **argv, struct daxctl_ctx *ctx) |
||||
-{ |
||||
- int i; |
||||
- static const struct option options[] = { |
||||
- OPT_END(), |
||||
- }; |
||||
- const char * const u[] = { |
||||
- "daxctl migrate-device-model", |
||||
- NULL |
||||
- }; |
||||
- |
||||
- argc = parse_options(argc, argv, options, u, 0); |
||||
- for (i = 0; i < argc; i++) |
||||
- error("unknown parameter \"%s\"\n", argv[i]); |
||||
- |
||||
- if (argc) |
||||
- usage_with_options(u, options); |
||||
- |
||||
- if (symlink(DAXCTL_MODPROBE_DATA, DAXCTL_MODPROBE_INSTALL) == 0) { |
||||
- fprintf(stderr, " success: installed %s\n", |
||||
- DAXCTL_MODPROBE_INSTALL); |
||||
- return EXIT_SUCCESS; |
||||
- } |
||||
- |
||||
- error("failed to install %s: %s\n", DAXCTL_MODPROBE_INSTALL, |
||||
- strerror(errno)); |
||||
- |
||||
- return EXIT_FAILURE; |
||||
-} |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Make sure libnvdimm is loaded and ndctl is available in the initramfs |
||||
install_items+="/bin/ndctl" |
||||
add_drivers+=" libnvdimm " |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
diff -up ndctl-65/contrib/nvdimm-security.conf.orig ndctl-65/contrib/nvdimm-security.conf |
||||
--- ndctl-65/contrib/nvdimm-security.conf.orig 2019-08-06 16:00:24.264089607 -0400 |
||||
+++ ndctl-65/contrib/nvdimm-security.conf 2019-08-06 16:00:34.971125206 -0400 |
||||
@@ -1 +1 @@ |
||||
-install libnvdimm /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS |
||||
+install libnvdimm /usr/bin/ndctl load-keys; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
diff -up ndctl-64.1/configure.ac.orig ndctl-64.1/configure.ac |
||||
--- ndctl-64.1/configure.ac.orig 2019-03-22 15:46:50.206526000 -0400 |
||||
+++ ndctl-64.1/configure.ac 2019-03-22 15:47:12.743488000 -0400 |
||||
@@ -45,7 +45,7 @@ AM_CONDITIONAL([ENABLE_DOCS], [test "x$e |
||||
AC_ARG_ENABLE([asciidoctor], |
||||
AS_HELP_STRING([--enable-asciidoctor], |
||||
[use asciidoctor for documentation build]), |
||||
- [], enable_asciidoctor=yes) |
||||
+ [], enable_asciidoctor=no) |
||||
AM_CONDITIONAL([USE_ASCIIDOCTOR], [test "x$enable_asciidoctor" = "xyes"]) |
||||
if test "x$enable_asciidoctor" = "xyes"; then |
||||
asciidoc="asciidoctor" |
@ -0,0 +1,95 @@
@@ -0,0 +1,95 @@
|
||||
diff --git a/test/core.c b/test/core.c |
||||
index b9e3bbf..4b36b2d 100644 |
||||
--- a/test/core.c |
||||
+++ b/test/core.c |
||||
@@ -129,8 +129,6 @@ int nfit_test_init(struct kmod_ctx **ctx, struct kmod_module **mod, |
||||
"nfit", |
||||
"device_dax", |
||||
"dax_pmem", |
||||
- "dax_pmem_core", |
||||
- "dax_pmem_compat", |
||||
"libnvdimm", |
||||
"nd_blk", |
||||
"nd_btt", |
||||
diff --git a/test/device-dax.c b/test/device-dax.c |
||||
index b19c1ed..d85862b 100644 |
||||
--- a/test/device-dax.c |
||||
+++ b/test/device-dax.c |
||||
@@ -166,6 +166,7 @@ static int __test_device_dax(unsigned long align, int loglevel, |
||||
if (!ndctl_test_attempt(test, KERNEL_VERSION(4, 7, 0))) |
||||
return 77; |
||||
|
||||
+#if 0 |
||||
/* setup up fsdax mode pmem device and seed with verification data */ |
||||
rc = setup_pmem_fsdax_mode(ndns, align); |
||||
if (rc < 0 || !(pfn = ndctl_namespace_get_pfn(ndns))) { |
||||
@@ -199,7 +200,7 @@ static int __test_device_dax(unsigned long align, int loglevel, |
||||
} |
||||
fsync(fd); |
||||
close(fd); |
||||
- |
||||
+#endif |
||||
/* switch the namespace to device-dax mode and verify data via mmap */ |
||||
rc = setup_device_dax(ndns, align); |
||||
if (rc < 0) { |
||||
@@ -219,6 +220,7 @@ static int __test_device_dax(unsigned long align, int loglevel, |
||||
} |
||||
|
||||
sprintf(path, "/dev/%s", daxctl_dev_get_devname(dev)); |
||||
+#if 0 |
||||
fd = open(path, O_RDONLY); |
||||
if (fd < 0) { |
||||
fprintf(stderr, "%s: failed to open(O_RDONLY) device-dax instance\n", |
||||
@@ -246,7 +248,7 @@ static int __test_device_dax(unsigned long align, int loglevel, |
||||
|
||||
close(fd); |
||||
munmap(buf, VERIFY_SIZE(align)); |
||||
- |
||||
+#endif |
||||
/* |
||||
* Prior to 4.8-final these tests cause crashes, or are |
||||
* otherwise not supported. |
||||
@@ -262,6 +264,7 @@ static int __test_device_dax(unsigned long align, int loglevel, |
||||
rc = -ENXIO; |
||||
goto out; |
||||
} |
||||
+ |
||||
rc = test_dax_directio(fd, align, NULL, 0); |
||||
if (rc) { |
||||
fprintf(stderr, "%s: failed dax direct-i/o\n", |
||||
diff --git a/test/libndctl.c b/test/libndctl.c |
||||
index 02bb9cc..2a20941 100644 |
||||
--- a/test/libndctl.c |
||||
+++ b/test/libndctl.c |
||||
@@ -160,9 +160,9 @@ static struct btt { |
||||
int enabled; |
||||
uuid_t uuid; |
||||
int num_sector_sizes; |
||||
- unsigned int sector_sizes[7]; |
||||
+ unsigned int sector_sizes[2]; |
||||
} default_btt = { |
||||
- 0, { 0, }, 7, { 512, 520, 528, 4096, 4104, 4160, 4224, }, |
||||
+ 0, { 0, }, 2, { 512, 4096, }, |
||||
}; |
||||
|
||||
struct pfn { |
||||
@@ -214,8 +214,8 @@ static struct btt btt_settings = { |
||||
.uuid = { 0, 1, 2, 3, 4, 5, 6, 7, |
||||
8, 9, 10, 11, 12, 13, 14, 15 |
||||
}, |
||||
- .num_sector_sizes = 7, |
||||
- .sector_sizes = { 512, 520, 528, 4096, 4104, 4160, 4224, }, |
||||
+ .num_sector_sizes = 2, |
||||
+ .sector_sizes = { 512, 4096, }, |
||||
}; |
||||
|
||||
static struct pfn pfn_settings = { |
||||
@@ -250,7 +250,7 @@ struct namespace { |
||||
}; |
||||
|
||||
static uuid_t null_uuid; |
||||
-static unsigned long blk_sector_sizes[] = { 512, 520, 528, 4096, 4104, 4160, 4224, }; |
||||
+static unsigned long blk_sector_sizes[] = { 512, 4096, }; |
||||
static unsigned long pmem_sector_sizes[] = { 512, 4096 }; |
||||
static unsigned long io_sector_sizes[] = { 0 }; |
||||
|
Loading…
Reference in new issue