summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-08-23 14:33:28 +1000
committerNeilBrown <neilb@suse.de>2010-09-06 11:26:27 +1000
commite3bb5f144bfdfb3ae66be8de2393e87162f01264 (patch)
tree6109bf855cbfe8d8ae14b1db6b8704332ab3d8b8 /mdadm.h
parent5527fc74620ecc831d7c854c200e34211ceb63de (diff)
downloadmdadm-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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 796d762..ce57f9e 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -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