summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-05-03 14:25:57 -0400
committerJes Sorensen <jsorensen@fb.com>2017-05-03 16:15:16 -0400
commit9db2ab4e9b1ad79b9364b6e03bdd675716a688a5 (patch)
tree88417eb67da0146a151e94a9efebd38cdf0da6a2 /mdadm.h
parent99148c19bd9149bb938309ffb6b4dcde20b67934 (diff)
downloadmdadm-9db2ab4e9b1ad79b9364b6e03bdd675716a688a5.tar.gz
util: md_array_valid(): Introduce md_array_valid() helper
Using md_get_array_info() to determine if an array is valid is broken during creation, since the ioctl() returns -ENODEV if the device is valid but not active. Where did I leave my stash of brown paper bags? Fixes: ("40b054e mdopen/open_mddev: Use md_get_array_info() to determine valid array") 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 6a382a7..07ee963 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_valid(int fd);
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);