summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-11-05 13:07:16 +0100
committerMariusz Tkaczyk <mtkaczyk@kernel.org>2024-12-16 10:11:31 +0100
commitb9888145987e273a7613209721a68f75e060263e (patch)
treea62bdc1eb8137506a52ed257e1372bf99ea6727b /Manage.c
parentsysfs: functions for writing md/<memb>/state (diff)
downloadmdadm-b9888145987e273a7613209721a68f75e060263e.tar.xz
mdadm-b9888145987e273a7613209721a68f75e060263e.zip
Incremental: Simplify remove logic
Incremental_remove() does not execute Manage_subdevs() now. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Manage.c b/Manage.c
index d618a2f0..034eb00c 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1381,8 +1381,6 @@ bool is_remove_safe(mdu_array_info_t *array, const int fd, char *devname, const
* 'f' - set the device faulty SET_DISK_FAULTY
* device can be 'detached' in which case any device that
* is inaccessible will be marked faulty.
- * 'I' - remove device by using incremental fail
- * which is executed when device is removed surprisingly.
* 'R' - mark this device as wanting replacement.
* 'W' - this device is added if necessary and activated as
* a replacement for a previous 'R' device.
@@ -1544,9 +1542,9 @@ int Manage_subdevs(char *devname, int fd,
/* This is a kernel-internal name like 'sda1' */
- if (!strchr("rfI", dv->disposition)) {
- pr_err("%s only meaningful with -r, -f or -I, not -%c\n",
- dv->devname, dv->disposition);
+ if (!strchr("rf", dv->disposition)) {
+ pr_err("%s only meaningful with -r, -f, not -%c\n", dv->devname,
+ dv->disposition);
goto abort;
}
@@ -1673,7 +1671,7 @@ int Manage_subdevs(char *devname, int fd,
close_fd(&sysfd);
goto abort;
}
- case 'I':
+
if (is_fd_valid(sysfd)) {
rv = sysfs_set_memb_state_fd(sysfd, MEMB_STATE_FAULTY, &err);
} else {