Blame SOURCES/daxctl-remove-migrate-device-model.patch

c21584
diff -uprN ndctl-65.orig/Documentation/daxctl/Makefile.am ndctl-65/Documentation/daxctl/Makefile.am
c21584
--- ndctl-65.orig/Documentation/daxctl/Makefile.am	2019-07-29 14:41:44.474017128 -0400
c21584
+++ ndctl-65/Documentation/daxctl/Makefile.am	2019-07-29 14:53:17.934283220 -0400
c21584
@@ -27,8 +27,7 @@ endif
c21584
 
c21584
 man1_MANS = \
c21584
 	daxctl.1 \
c21584
-	daxctl-list.1 \
c21584
-	daxctl-migrate-device-model.1
c21584
+	daxctl-list.1
c21584
 
c21584
 CLEANFILES = $(man1_MANS)
c21584
 
c21584
diff -uprN ndctl-65.orig/Documentation/daxctl/daxctl-migrate-device-model.txt ndctl-65/Documentation/daxctl/daxctl-migrate-device-model.txt
c21584
--- ndctl-65.orig/Documentation/daxctl/daxctl-migrate-device-model.txt	2019-07-29 14:41:44.473017124 -0400
c21584
+++ ndctl-65/Documentation/daxctl/daxctl-migrate-device-model.txt	1969-12-31 19:00:00.000000000 -0500
c21584
@@ -1,47 +0,0 @@
c21584
-// SPDX-License-Identifier: GPL-2.0
c21584
-
c21584
-daxctl-migrate-device-model(1)
c21584
-==============================
c21584
-
c21584
-NAME
c21584
-----
c21584
-daxctl-migrate-device-model - Opt-in to the /sys/bus/dax device-model,
c21584
-allow for alternative Device-DAX instance drivers.
c21584
-
c21584
-SYNOPSIS
c21584
---------
c21584
-[verse]
c21584
-'daxctl migrate-device-model'
c21584
-
c21584
-Arrange for modprobe to disable the dax_pmem_compat, if present, and
c21584
-instead deploy the dax_pmem module to convert to the /sys/bus/dax model.
c21584
-Kernel versions prior to v5.1 may not support /sys/bus/dax in which case
c21584
-the result of this command is a nop until the kernel is updated.  The
c21584
-motivation for changing from /sys/class/dax to /sys/bus/dax is to allow
c21584
-for alternative drivers for Device-DAX instances, in particular the
c21584
-dax_kmem driver.
c21584
-
c21584
-By default device-dax publishes a /dev/daxX.Y character device for
c21584
-userspace to directly map performance differentiated memory. This is
c21584
-fine if the memory is to be exclusively consumed / managed by userspace.
c21584
-Alternatively an administrator may want the kernel to manage the memory,
c21584
-make it available via malloc(), allow for over-provisioning, and / or
c21584
-apply kernel-based resource control schemes to the memory. In that case
c21584
-the memory fronted by a given Device-DAX instance can be assigned to the
c21584
-dax_kmem driver which arranges for the core-kernel memory-management
c21584
-sub-system to assume management of the memory range.
c21584
-
c21584
-This behavior is opt-in for consideration of existing applications /
c21584
-scripts that may be hard coded to use /sys/class/dax. Fixes have been
c21584
-submitted to applications known to have these direct dependencies
c21584
-http://git.kernel.dk/cgit/fio/commit/?id=b08e7d6b18b4[FIO]
c21584
-https://github.com/pmem/pmdk/commit/91bc8620884e[PMDK], however, there may
c21584
-be others and a system-owner should be aware of the potential for
c21584
-regression of Device-DAX consuming scripts, applications, or older
c21584
-daxctl binaries.
c21584
-
c21584
-The modprobe policy established by this utility becomes effective after
c21584
-the next reboot, or after all DAX related modules have been removed and
c21584
-re-loaded with "udevadm trigger"
c21584
-
c21584
-include::../copyright.txt[]
c21584
diff -uprN ndctl-65.orig/daxctl/Makefile.am ndctl-65/daxctl/Makefile.am
c21584
--- ndctl-65.orig/daxctl/Makefile.am	2019-07-29 14:41:44.486017168 -0400
c21584
+++ ndctl-65/daxctl/Makefile.am	2019-07-29 14:53:10.288257995 -0400
c21584
@@ -14,7 +14,6 @@ config.h: $(srcdir)/Makefile.am
c21584
 daxctl_SOURCES =\
c21584
 		daxctl.c \
c21584
 		list.c \
c21584
-		migrate.c \
c21584
 		../util/json.c
c21584
 
c21584
 daxctl_LDADD =\
c21584
diff -uprN ndctl-65.orig/daxctl/builtin.h ndctl-65/daxctl/builtin.h
c21584
--- ndctl-65.orig/daxctl/builtin.h	2019-07-29 14:41:44.486017168 -0400
c21584
+++ ndctl-65/daxctl/builtin.h	2019-07-29 14:53:10.288257995 -0400
c21584
@@ -5,5 +5,4 @@
c21584
 
c21584
 struct daxctl_ctx;
c21584
 int cmd_list(int argc, const char **argv, struct daxctl_ctx *ctx);
c21584
-int cmd_migrate(int argc, const char **argv, struct daxctl_ctx *ctx);
c21584
 #endif /* _DAXCTL_BUILTIN_H_ */
c21584
diff -uprN ndctl-65.orig/daxctl/daxctl.c ndctl-65/daxctl/daxctl.c
c21584
--- ndctl-65.orig/daxctl/daxctl.c	2019-07-29 14:41:44.486017168 -0400
c21584
+++ ndctl-65/daxctl/daxctl.c	2019-07-29 14:53:10.288257995 -0400
c21584
@@ -70,7 +70,6 @@ static struct cmd_struct commands[] = {
c21584
 	{ "version", .d_fn = cmd_version },
c21584
 	{ "list", .d_fn = cmd_list },
c21584
 	{ "help", .d_fn = cmd_help },
c21584
-	{ "migrate-device-model", .d_fn = cmd_migrate },
c21584
 };
c21584
 
c21584
 int main(int argc, const char **argv)
c21584
diff -uprN ndctl-65.orig/daxctl/migrate.c ndctl-65/daxctl/migrate.c
c21584
--- ndctl-65.orig/daxctl/migrate.c	2019-07-29 14:41:44.487017171 -0400
c21584
+++ ndctl-65/daxctl/migrate.c	1969-12-31 19:00:00.000000000 -0500
c21584
@@ -1,41 +0,0 @@
c21584
-/* SPDX-License-Identifier: GPL-2.0 */
c21584
-/* Copyright(c) 2019 Intel Corporation. All rights reserved. */
c21584
-#include <sys/types.h>
c21584
-#include <sys/stat.h>
c21584
-#include <stdio.h>
c21584
-#include <errno.h>
c21584
-#include <fcntl.h>
c21584
-#include <daxctl/config.h>
c21584
-#include <daxctl/libdaxctl.h>
c21584
-#include <util/parse-options.h>
c21584
-#include <ccan/array_size/array_size.h>
c21584
-
c21584
-int cmd_migrate(int argc, const char **argv, struct daxctl_ctx *ctx)
c21584
-{
c21584
-	int i;
c21584
-	static const struct option options[] = {
c21584
-		OPT_END(),
c21584
-	};
c21584
-	const char * const u[] = {
c21584
-		"daxctl migrate-device-model",
c21584
-		NULL
c21584
-	};
c21584
-
c21584
-	argc = parse_options(argc, argv, options, u, 0);
c21584
-	for (i = 0; i < argc; i++)
c21584
-		error("unknown parameter \"%s\"\n", argv[i]);
c21584
-
c21584
-	if (argc)
c21584
-		usage_with_options(u, options);
c21584
-
c21584
-	if (symlink(DAXCTL_MODPROBE_DATA, DAXCTL_MODPROBE_INSTALL) == 0) {
c21584
-		fprintf(stderr, " success: installed %s\n",
c21584
-				DAXCTL_MODPROBE_INSTALL);
c21584
-		return EXIT_SUCCESS;
c21584
-	}
c21584
-
c21584
-	error("failed to install %s: %s\n", DAXCTL_MODPROBE_INSTALL,
c21584
-			strerror(errno));
c21584
-
c21584
-	return EXIT_FAILURE;
c21584
-}