diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-02-29 12:52:14 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-03-11 11:09:10 +0100 |
commit | 51a9f2fc5e982f3bcbf88fe1bf30c0bf55bfd49c (patch) | |
tree | 510546fc2f767a69caf4e5c7528bc62791c1cb68 /mdadm.h | |
parent | Manage: check device policies in manage_add_external() (diff) | |
download | mdadm-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 'mdadm.h')
-rw-r--r-- | mdadm.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -433,6 +433,7 @@ struct spare_criteria { bool criteria_set; unsigned long long min_size; unsigned int sector_size; + struct dev_policy *pols; }; typedef enum mdadm_status { @@ -1734,8 +1735,8 @@ extern int assemble_container_content(struct supertype *st, int mdfd, #define INCR_ALREADY 4 #define INCR_YES 8 -extern bool devid_matches_criteria(dev_t devid, struct spare_criteria *sc); -extern bool disk_fd_matches_criteria(int disk_fd, struct spare_criteria *sc); +extern bool devid_matches_criteria(struct supertype *st, dev_t devid, struct spare_criteria *sc); +extern bool disk_fd_matches_criteria(struct supertype *st, int disk_fd, struct spare_criteria *sc); extern struct mdinfo *container_choose_spares(struct supertype *st, struct spare_criteria *criteria, struct domainlist *domlist, |