diff options
author | NeilBrown <neilb@suse.de> | 2010-08-23 14:33:28 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-09-06 11:26:27 +1000 |
commit | e3bb5f144bfdfb3ae66be8de2393e87162f01264 (patch) | |
tree | 6109bf855cbfe8d8ae14b1db6b8704332ab3d8b8 /mdadm.h | |
parent | 5527fc74620ecc831d7c854c200e34211ceb63de (diff) | |
download | mdadm-e3bb5f144bfdfb3ae66be8de2393e87162f01264.tar.gz |
Add policy_action support
Add code for easy working 'action' policies.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -792,6 +792,19 @@ extern void dev_policy_free(struct dev_policy *p); extern void pol_new(struct dev_policy **pol, char *name, char *val, char *metadata); extern struct dev_policy *pol_find(struct dev_policy *pol, char *name); +enum policy_action { + act_default, + act_include, + act_re_add, + act_spare, + act_force_spare, + act_err +}; + +extern int policy_action_allows(struct dev_policy *plist, const char *metadata, + enum policy_action want); +extern int disk_action_allows(struct mdinfo *disk, const char *metadata, + enum policy_action want); #if __GNUC__ < 3 struct stat64; #endif |