summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@gmail.com>2017-04-05 21:34:44 +0200
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-04-05 21:34:44 +0200
commit091e8e6e061a5739be68d214bbd4a25e38bec65c (patch)
tree9c44a6d6d43a77f7ad4683a9e225706b3357386f /Manage.c
parentCreate: Remove all attemps to handle md driver older than 0.90.03 (diff)
downloadmdadm-091e8e6e061a5739be68d214bbd4a25e38bec65c.tar.xz
mdadm-091e8e6e061a5739be68d214bbd4a25e38bec65c.zip
Manage: Remove all references to md_get_version()
At this point, support for md driver prior to 0.90.03 is going to disappear. Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/Manage.c b/Manage.c
index 618c98b4..9e691320 100644
--- a/Manage.c
+++ b/Manage.c
@@ -46,10 +46,6 @@ int Manage_ro(char *devname, int fd, int readonly)
#endif
int rv = 0;
- if (md_get_version(fd) < 9000) {
- pr_err("need md driver version 0.90.0 or later\n");
- return 1;
- }
#ifndef MDASSEMBLE
/* If this is an externally-managed array, we need to modify the
* metadata_version so that mdmon doesn't undo our change.
@@ -176,10 +172,6 @@ int Manage_run(char *devname, int fd, struct context *c)
*/
char nm[32], *nmp;
- if (md_get_version(fd) < 9000) {
- pr_err("need md driver version 0.90.0 or later\n");
- return 1;
- }
nmp = fd2devnm(fd);
if (!nmp) {
pr_err("Cannot find %s in sysfs!!\n", devname);
@@ -207,14 +199,6 @@ int Manage_stop(char *devname, int fd, int verbose, int will_retry)
if (will_retry && verbose == 0)
verbose = -1;
- if (md_get_version(fd) < 9000) {
- if (ioctl(fd, STOP_MD, 0) == 0)
- return 0;
- pr_err("stopping device %s failed: %s\n",
- devname, strerror(errno));
- return 1;
- }
-
strcpy(devnm, fd2devnm(fd));
/* Get EXCL access first. If this fails, then attempting
* to stop is probably a bad idea.
@@ -773,9 +757,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
" Adding anyway as --force was given.\n",
dv->devname, devname);
}
- if (!tst->ss->external &&
- array->major_version == 0 &&
- md_get_version(fd)%100 < 2) {
+ if (!tst->ss->external && array->major_version == 0) {
if (ioctl(fd, HOT_ADD_DISK, rdev)==0) {
if (verbose >= 0)
pr_err("hot added %s\n",