summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-29 12:52:11 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-03-11 11:08:20 +0100
commit5a2e194cb31569880a26356b8594ddca6e3b3828 (patch)
tree6f06c4a8ae4ad961bb382358520c3a1637115984 /mdadm.h
parentmdadm.h: Introduce custom device policies (diff)
downloadmdadm-5a2e194cb31569880a26356b8594ddca6e3b3828.tar.xz
mdadm-5a2e194cb31569880a26356b8594ddca6e3b3828.zip
mdadm: test_and_add device policies implementation
Add support for three scenarios: - obtaining array wide policies via fd, - obtaining array wide policies via struct mdinfo, - getting policies for particular drive from the request. Add proper functions and make them extern. These functions are used in next patches. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 889f4a0f..af2bc714 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1452,6 +1452,13 @@ extern void dev_policy_free(struct dev_policy *p);
extern void pol_add(struct dev_policy **pol, char *name, char *val, char *metadata);
extern struct dev_policy *pol_find(struct dev_policy *pol, char *name);
+extern mdadm_status_t drive_test_and_add_policies(struct supertype *st, dev_policy_t **pols,
+ int fd, const int verbose);
+extern mdadm_status_t sysfs_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ struct mdinfo *mdi, const int verbose);
+extern mdadm_status_t mddev_test_and_add_drive_policies(struct supertype *st, dev_policy_t **pols,
+ int array_fd, const int verbose);
+
enum policy_action {
act_default,
act_include,