diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-02-29 12:52:11 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-03-11 11:08:20 +0100 |
commit | 5a2e194cb31569880a26356b8594ddca6e3b3828 (patch) | |
tree | 6f06c4a8ae4ad961bb382358520c3a1637115984 /mdadm.h | |
parent | mdadm.h: Introduce custom device policies (diff) | |
download | mdadm-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.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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, |