summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-29 12:52:14 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-03-11 11:09:10 +0100
commit51a9f2fc5e982f3bcbf88fe1bf30c0bf55bfd49c (patch)
tree510546fc2f767a69caf4e5c7528bc62791c1cb68 /Incremental.c
parentManage: check device policies in manage_add_external() (diff)
downloadmdadm-51a9f2fc5e982f3bcbf88fe1bf30c0bf55bfd49c.tar.xz
mdadm-51a9f2fc5e982f3bcbf88fe1bf30c0bf55bfd49c.zip
Monitor, Incremental: use device policies
spare_criteria is expanded to contain policies which will be generated by handler's get_spare_criteria() function. It provides a way to test device for metadata specific policies earlier than during add_do_super(), when device is already removed from previous array/container for Monitor. For Incremental, it ensures that all criteria are tested when trying spare. It is not tested when device contains valid metadata. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Incremental.c b/Incremental.c
index 66c2cc86..958ba9ba 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -865,7 +865,7 @@ mdadm_status_t incremental_external_test_spare_criteria(struct supertype *st, ch
goto out;
}
- if (!disk_fd_matches_criteria(disk_fd, &sc)) {
+ if (!disk_fd_matches_criteria(dup, disk_fd, &sc)) {
if (verbose > 1)
pr_err("Disk does not match spare criteria for %s\n", container_devname);
goto out;