You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

140 lines
5.2 KiB

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;
-}