|
|
5d5466 |
From 1cc3965d48deb0fb3e0657159c608ffb124643c1 Mon Sep 17 00:00:00 2001
|
|
|
5d5466 |
From: Xiao Yang <ice_yangxiao@163.com>
|
|
|
5d5466 |
Date: Wed, 27 Nov 2019 11:59:24 +0800
|
|
|
5d5466 |
Subject: [RHEL8.2 PATCH 48/61] Manage: Remove the legacy code for md driver
|
|
|
5d5466 |
prior to 0.90.03
|
|
|
5d5466 |
|
|
|
5d5466 |
Previous re-add operation only calls ioctl(HOT_ADD_DISK) for array without
|
|
|
5d5466 |
metadata(e.g. mdadm -B/--build) when md driver is less than 0.90.02, but
|
|
|
5d5466 |
commit 091e8e6 breaks the logic and current re-add operation can call
|
|
|
5d5466 |
ioctl(HOT_ADD_DISK) even if md driver is 0.90.03.
|
|
|
5d5466 |
|
|
|
5d5466 |
This issue is reproduced by 05r1-re-add-nosuper:
|
|
|
5d5466 |
------------------------------------------------
|
|
|
5d5466 |
++ die 'resync or recovery is happening!'
|
|
|
5d5466 |
++ echo -e '\n\tERROR: resync or recovery is happening! \n'
|
|
|
5d5466 |
ERROR: resync or recovery is happening!
|
|
|
5d5466 |
------------------------------------------------
|
|
|
5d5466 |
|
|
|
5d5466 |
Fixes: 091e8e6("Manage: Remove all references to md_get_version()")
|
|
|
5d5466 |
Reported-by: kernel test robot <lkp@intel.com>
|
|
|
5d5466 |
Signed-off-by: Xiao Yang <ice_yangxiao@163.com>
|
|
|
5d5466 |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
5d5466 |
---
|
|
|
5d5466 |
Manage.c | 12 ------------
|
|
|
5d5466 |
1 file changed, 12 deletions(-)
|
|
|
5d5466 |
|
|
|
5d5466 |
diff --git a/Manage.c b/Manage.c
|
|
|
5d5466 |
index 21536f5..ffe55f8 100644
|
|
|
5d5466 |
--- a/Manage.c
|
|
|
5d5466 |
+++ b/Manage.c
|
|
|
5d5466 |
@@ -741,18 +741,6 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
|
|
|
5d5466 |
" Adding anyway as --force was given.\n",
|
|
|
5d5466 |
dv->devname, devname);
|
|
|
5d5466 |
}
|
|
|
5d5466 |
- if (!tst->ss->external && array->major_version == 0) {
|
|
|
5d5466 |
- if (ioctl(fd, HOT_ADD_DISK, rdev)==0) {
|
|
|
5d5466 |
- if (verbose >= 0)
|
|
|
5d5466 |
- pr_err("hot added %s\n",
|
|
|
5d5466 |
- dv->devname);
|
|
|
5d5466 |
- return 1;
|
|
|
5d5466 |
- }
|
|
|
5d5466 |
-
|
|
|
5d5466 |
- pr_err("hot add failed for %s: %s\n",
|
|
|
5d5466 |
- dv->devname, strerror(errno));
|
|
|
5d5466 |
- return -1;
|
|
|
5d5466 |
- }
|
|
|
5d5466 |
|
|
|
5d5466 |
if (array->not_persistent == 0 || tst->ss->external) {
|
|
|
5d5466 |
|
|
|
5d5466 |
--
|
|
|
5d5466 |
2.7.5
|
|
|
5d5466 |
|