|
|
cd8c44 |
From e4a030a0d3a953b8e74c118200e58dc83c2fc608 Mon Sep 17 00:00:00 2001
|
|
|
cd8c44 |
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
|
|
cd8c44 |
Date: Tue, 19 Jul 2022 14:48:22 +0200
|
|
|
2b63fb |
Subject: [PATCH 48/83] mdadm: remove symlink option
|
|
|
cd8c44 |
|
|
|
cd8c44 |
The option is not used. Remove it from code.
|
|
|
cd8c44 |
|
|
|
cd8c44 |
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
|
|
cd8c44 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
cd8c44 |
---
|
|
|
cd8c44 |
ReadMe.c | 1 -
|
|
|
cd8c44 |
config.c | 7 +------
|
|
|
cd8c44 |
mdadm.8.in | 9 ---------
|
|
|
cd8c44 |
mdadm.c | 20 --------------------
|
|
|
cd8c44 |
mdadm.conf.5.in | 15 ---------------
|
|
|
cd8c44 |
mdadm.h | 2 --
|
|
|
cd8c44 |
6 files changed, 1 insertion(+), 53 deletions(-)
|
|
|
cd8c44 |
|
|
|
cd8c44 |
diff --git a/ReadMe.c b/ReadMe.c
|
|
|
cd8c44 |
index 7518a32a..7f94847e 100644
|
|
|
cd8c44 |
--- a/ReadMe.c
|
|
|
cd8c44 |
+++ b/ReadMe.c
|
|
|
cd8c44 |
@@ -147,7 +147,6 @@ struct option long_options[] = {
|
|
|
cd8c44 |
{"nofailfast",0, 0, NoFailFast},
|
|
|
cd8c44 |
{"re-add", 0, 0, ReAdd},
|
|
|
cd8c44 |
{"homehost", 1, 0, HomeHost},
|
|
|
cd8c44 |
- {"symlinks", 1, 0, Symlinks},
|
|
|
cd8c44 |
{"data-offset",1, 0, DataOffset},
|
|
|
cd8c44 |
{"nodes",1, 0, Nodes}, /* also for --assemble */
|
|
|
cd8c44 |
{"home-cluster",1, 0, ClusterName},
|
|
|
cd8c44 |
diff --git a/config.c b/config.c
|
|
|
cd8c44 |
index 9c725457..dc1620c1 100644
|
|
|
cd8c44 |
--- a/config.c
|
|
|
cd8c44 |
+++ b/config.c
|
|
|
cd8c44 |
@@ -194,7 +194,6 @@ struct mddev_dev *load_containers(void)
|
|
|
cd8c44 |
|
|
|
cd8c44 |
struct createinfo createinfo = {
|
|
|
cd8c44 |
.autof = 2, /* by default, create devices with standard names */
|
|
|
cd8c44 |
- .symlinks = 1,
|
|
|
cd8c44 |
.names = 0, /* By default, stick with numbered md devices. */
|
|
|
cd8c44 |
.bblist = 1, /* Use a bad block list by default */
|
|
|
cd8c44 |
#ifdef DEBIAN
|
|
|
cd8c44 |
@@ -310,11 +309,7 @@ static void createline(char *line)
|
|
|
cd8c44 |
if (!createinfo.supertype)
|
|
|
cd8c44 |
pr_err("metadata format %s unknown, ignoring\n",
|
|
|
cd8c44 |
w+9);
|
|
|
cd8c44 |
- } else if (strncasecmp(w, "symlinks=yes", 12) == 0)
|
|
|
cd8c44 |
- createinfo.symlinks = 1;
|
|
|
cd8c44 |
- else if (strncasecmp(w, "symlinks=no", 11) == 0)
|
|
|
cd8c44 |
- createinfo.symlinks = 0;
|
|
|
cd8c44 |
- else if (strncasecmp(w, "names=yes", 12) == 0)
|
|
|
cd8c44 |
+ } else if (strncasecmp(w, "names=yes", 12) == 0)
|
|
|
cd8c44 |
createinfo.names = 1;
|
|
|
cd8c44 |
else if (strncasecmp(w, "names=no", 11) == 0)
|
|
|
cd8c44 |
createinfo.names = 0;
|
|
|
cd8c44 |
diff --git a/mdadm.8.in b/mdadm.8.in
|
|
|
cd8c44 |
index 0be02e4a..f2736226 100644
|
|
|
cd8c44 |
--- a/mdadm.8.in
|
|
|
cd8c44 |
+++ b/mdadm.8.in
|
|
|
cd8c44 |
@@ -1048,11 +1048,6 @@ simultaneously. If not specified, this defaults to 4.
|
|
|
cd8c44 |
Specify journal device for the RAID-4/5/6 array. The journal device
|
|
|
cd8c44 |
should be a SSD with reasonable lifetime.
|
|
|
cd8c44 |
|
|
|
cd8c44 |
-.TP
|
|
|
cd8c44 |
-.BR \-\-symlinks
|
|
|
cd8c44 |
-Auto creation of symlinks in /dev to /dev/md, option --symlinks must
|
|
|
cd8c44 |
-be 'no' or 'yes' and work with --create and --build.
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
.TP
|
|
|
cd8c44 |
.BR \-k ", " \-\-consistency\-policy=
|
|
|
cd8c44 |
Specify how the array maintains consistency in case of unexpected shutdown.
|
|
|
cd8c44 |
@@ -1405,10 +1400,6 @@ Reshape can be continued later using the
|
|
|
cd8c44 |
.B \-\-continue
|
|
|
cd8c44 |
option for the grow command.
|
|
|
cd8c44 |
|
|
|
cd8c44 |
-.TP
|
|
|
cd8c44 |
-.BR \-\-symlinks
|
|
|
cd8c44 |
-See this option under Create and Build options.
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
.SH For Manage mode:
|
|
|
cd8c44 |
|
|
|
cd8c44 |
.TP
|
|
|
cd8c44 |
diff --git a/mdadm.c b/mdadm.c
|
|
|
cd8c44 |
index 56722ed9..180f7a9c 100644
|
|
|
cd8c44 |
--- a/mdadm.c
|
|
|
cd8c44 |
+++ b/mdadm.c
|
|
|
cd8c44 |
@@ -59,7 +59,6 @@ int main(int argc, char *argv[])
|
|
|
cd8c44 |
struct mddev_dev *dv;
|
|
|
cd8c44 |
mdu_array_info_t array;
|
|
|
cd8c44 |
int devs_found = 0;
|
|
|
cd8c44 |
- char *symlinks = NULL;
|
|
|
cd8c44 |
int grow_continue = 0;
|
|
|
cd8c44 |
/* autof indicates whether and how to create device node.
|
|
|
cd8c44 |
* bottom 3 bits are style. Rest (when shifted) are number of parts
|
|
|
cd8c44 |
@@ -663,13 +662,6 @@ int main(int argc, char *argv[])
|
|
|
cd8c44 |
case O(ASSEMBLE,Auto): /* auto-creation of device node */
|
|
|
cd8c44 |
c.autof = parse_auto(optarg, "--auto flag", 0);
|
|
|
cd8c44 |
continue;
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
- case O(CREATE,Symlinks):
|
|
|
cd8c44 |
- case O(BUILD,Symlinks):
|
|
|
cd8c44 |
- case O(ASSEMBLE,Symlinks): /* auto creation of symlinks in /dev to /dev/md */
|
|
|
cd8c44 |
- symlinks = optarg;
|
|
|
cd8c44 |
- continue;
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
case O(BUILD,'f'): /* force honouring '-n 1' */
|
|
|
cd8c44 |
case O(BUILD,Force): /* force honouring '-n 1' */
|
|
|
cd8c44 |
case O(GROW,'f'): /* ditto */
|
|
|
cd8c44 |
@@ -1325,18 +1317,6 @@ int main(int argc, char *argv[])
|
|
|
cd8c44 |
exit(2);
|
|
|
cd8c44 |
}
|
|
|
cd8c44 |
|
|
|
cd8c44 |
- if (symlinks) {
|
|
|
cd8c44 |
- struct createinfo *ci = conf_get_create_info();
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
- if (strcasecmp(symlinks, "yes") == 0)
|
|
|
cd8c44 |
- ci->symlinks = 1;
|
|
|
cd8c44 |
- else if (strcasecmp(symlinks, "no") == 0)
|
|
|
cd8c44 |
- ci->symlinks = 0;
|
|
|
cd8c44 |
- else {
|
|
|
cd8c44 |
- pr_err("option --symlinks must be 'no' or 'yes'\n");
|
|
|
cd8c44 |
- exit(2);
|
|
|
cd8c44 |
- }
|
|
|
cd8c44 |
- }
|
|
|
cd8c44 |
/* Ok, got the option parsing out of the way
|
|
|
cd8c44 |
* hopefully it's mostly right but there might be some stuff
|
|
|
cd8c44 |
* missing
|
|
|
cd8c44 |
diff --git a/mdadm.conf.5.in b/mdadm.conf.5.in
|
|
|
cd8c44 |
index cd4e6a9d..bc2295c2 100644
|
|
|
cd8c44 |
--- a/mdadm.conf.5.in
|
|
|
cd8c44 |
+++ b/mdadm.conf.5.in
|
|
|
cd8c44 |
@@ -338,21 +338,6 @@ missing device entries should be created.
|
|
|
cd8c44 |
The name of the metadata format to use if none is explicitly given.
|
|
|
cd8c44 |
This can be useful to impose a system-wide default of version-1 superblocks.
|
|
|
cd8c44 |
|
|
|
cd8c44 |
-.TP
|
|
|
cd8c44 |
-.B symlinks=no
|
|
|
cd8c44 |
-Normally when creating devices in
|
|
|
cd8c44 |
-.B /dev/md/
|
|
|
cd8c44 |
-.I mdadm
|
|
|
cd8c44 |
-will create a matching symlink from
|
|
|
cd8c44 |
-.B /dev/
|
|
|
cd8c44 |
-with a name starting
|
|
|
cd8c44 |
-.B md
|
|
|
cd8c44 |
-or
|
|
|
cd8c44 |
-.BR md_ .
|
|
|
cd8c44 |
-Give
|
|
|
cd8c44 |
-.B symlinks=no
|
|
|
cd8c44 |
-to suppress this symlink creation.
|
|
|
cd8c44 |
-
|
|
|
cd8c44 |
.TP
|
|
|
cd8c44 |
.B names=yes
|
|
|
cd8c44 |
Since Linux 2.6.29 it has been possible to create
|
|
|
cd8c44 |
diff --git a/mdadm.h b/mdadm.h
|
|
|
cd8c44 |
index add9c0b6..93e72786 100644
|
|
|
cd8c44 |
--- a/mdadm.h
|
|
|
cd8c44 |
+++ b/mdadm.h
|
|
|
cd8c44 |
@@ -394,7 +394,6 @@ struct createinfo {
|
|
|
cd8c44 |
int gid;
|
|
|
cd8c44 |
int autof;
|
|
|
cd8c44 |
int mode;
|
|
|
cd8c44 |
- int symlinks;
|
|
|
cd8c44 |
int names;
|
|
|
cd8c44 |
int bblist;
|
|
|
cd8c44 |
struct supertype *supertype;
|
|
|
cd8c44 |
@@ -442,7 +441,6 @@ enum special_options {
|
|
|
cd8c44 |
BackupFile,
|
|
|
cd8c44 |
HomeHost,
|
|
|
cd8c44 |
AutoHomeHost,
|
|
|
cd8c44 |
- Symlinks,
|
|
|
cd8c44 |
AutoDetect,
|
|
|
cd8c44 |
Waitclean,
|
|
|
cd8c44 |
DetailPlatform,
|
|
|
cd8c44 |
--
|
|
|
2b63fb |
2.38.1
|
|
|
cd8c44 |
|