]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
Use load_container in Incremental assembly.
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index 577d858e49f54a27c421bf4acdab147df52ab95b..7b651e27c535c4bb47951f5165e0bd14f4ff0a5c 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"
@@ -593,6 +597,7 @@ extern struct superswitch {
        int (*write_init_super)(struct supertype *st);
        int (*compare_super)(struct supertype *st, struct supertype *tst);
        int (*load_super)(struct supertype *st, int fd, char *devname);
+       int (*load_container)(struct supertype *st, int fd, char *devname);
        struct supertype * (*match_metadata_desc)(char *arg);
        __u64 (*avail_size)(struct supertype *st, __u64 size);
        int (*add_internal_bitmap)(struct supertype *st, int *chunkp,
@@ -617,7 +622,7 @@ extern struct superswitch {
                                 char *subdev, unsigned long long *freesize,
                                 int verbose);
 
-       struct mdinfo *(*container_content)(struct supertype *st);
+       struct mdinfo *(*container_content)(struct supertype *st, char *subarray);
        /* Allow a metadata handler to override mdadm's default layouts */
        int (*default_layout)(int level); /* optional */
        /* query the supertype for default chunk size */
@@ -625,7 +630,8 @@ extern struct superswitch {
        /* Permit subarray's to be deleted from inactive containers */
        int (*kill_subarray)(struct supertype *st); /* optional */
        /* Permit subarray's to be modified */
-       int (*update_subarray)(struct supertype *st, char *update, mddev_ident_t ident); /* optional */
+       int (*update_subarray)(struct supertype *st, char *subarray,
+                              char *update, mddev_ident_t ident); /* optional */
 
 /* for mdmon */
        int (*open_new)(struct supertype *c, struct active_array *a,
@@ -706,7 +712,6 @@ struct supertype {
        int minor_version;
        int max_devs;
        int container_dev;    /* devnum of container */
-       char subarray[32];      /* name of array inside container */
        void *sb;
        void *info;
        int loaded_container;   /* Set if load_super found a container,
@@ -728,7 +733,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) {
@@ -924,9 +929,6 @@ extern int WaitClean(char *dev, int sock, int verbose);
 extern int Incremental(char *devname, int verbose, int runstop,
                       struct supertype *st, char *homehost, int require_homehost,
                       int autof);
-extern int Incremental_container(struct supertype *st, char *devname,
-                                int verbose, int runstop, int autof,
-                                int trustworthy);
 extern void RebuildMap(void);
 extern int IncrementalScan(int verbose);
 extern int IncrementalRemove(char *devname, int verbose);
@@ -1028,7 +1030,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);