summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-04-13 13:30:17 -0400
committerJes Sorensen <jsorensen@fb.com>2017-04-20 00:12:34 -0400
commit3ab8f4bf33d906cb1084f7b4036556bfb4bb73ec (patch)
treed868dedbd7309ab70ed2f48ad2d5e6f245578285 /mdadm.h
parent5e4ca8bb82e98400c9258cb3d7e4d030576f21df (diff)
downloadmdadm-3ab8f4bf33d906cb1084f7b4036556bfb4bb73ec.tar.gz
util: Introduce md_array_active() helper
Rather than querying md_get_array_info() to determine whether an array is valid, do the work in md_array_active() using sysfs, and fall back on md_get_array_info() if sysfs fails. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index a379973..f6e97fd 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1415,6 +1415,7 @@ extern int Dump_metadata(char *dev, char *dir, struct context *c,
extern int Restore_metadata(char *dev, char *dir, struct context *c,
struct supertype *st, int only);
+int md_array_active(int fd);
int md_get_array_info(int fd, struct mdu_array_info_s *array);
int md_set_array_info(int fd, struct mdu_array_info_s *array);
int md_get_disk_info(int fd, struct mdu_disk_info_s *disk);