Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP1
mdadm.14070
0072-Manage-Remove-all-references-to-md_get_ver...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0072-Manage-Remove-all-references-to-md_get_version.patch of Package mdadm.14070
From 091e8e6e061a5739be68d214bbd4a25e38bec65c Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@gmail.com> Date: Wed, 5 Apr 2017 15:34:44 -0400 Subject: [PATCH] Manage: Remove all references to md_get_version() Git-commit: 091e8e6e061a5739be68d214bbd4a25e38bec65c Patch-mainline: mdadm-4.0+ References: bsc#1069165, bsc#1069167, bsc#1068030 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> Signed-off-by: Coly Li <colyli@suse.de> --- Manage.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Manage.c b/Manage.c index 618c98b..9e69132 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", -- 2.13.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor