]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
super_by_fd: return subarray info explicitly.
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index 577d858e49f54a27c421bf4acdab147df52ab95b..deff94827dee2b456424702a69d9123d2f4c3422 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -534,8 +534,12 @@ extern struct superswitch {
         * The particular device should be:
         *   The last device added by add_to_super
         *   The device the metadata was loaded from by load_super
+        * If 'map' is present, then it is an array raid_disks long
+        * (raid_disk must already be set and correct) and it is filled
+        * with 1 for slots that are thought to be active and 0 for slots which
+        * appear to be failed/missing.
         */
-       void (*getinfo_super)(struct supertype *st, struct mdinfo *info);
+       void (*getinfo_super)(struct supertype *st, struct mdinfo *info, char *map);
 
        /* Check if the given metadata is flagged as belonging to "this"
         * host.  0 for 'no', 1 for 'yes', -1 for "Don't record homehost"
@@ -728,7 +732,7 @@ struct supertype {
 
 };
 
-extern struct supertype *super_by_fd(int fd);
+extern struct supertype *super_by_fd(int fd, char **subarray);
 enum guess_types { guess_any, guess_array, guess_partitions };
 extern struct supertype *guess_super_type(int fd, enum guess_types guess_type);
 static inline struct supertype *guess_super(int fd) {
@@ -1028,7 +1032,7 @@ extern int open_container(int fd);
 extern int is_container_member(struct mdstat_ent *ent, char *devname);
 extern int is_subarray_active(char *subarray, char *devname);
 int is_container_active(char *devname);
-extern int open_subarray(char *dev, struct supertype *st, int quiet);
+extern int open_subarray(char *dev, char *subarray, struct supertype *st, int quiet);
 extern struct superswitch *version_to_superswitch(char *vers);
 
 extern int mdmon_running(int devnum);