]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
Support adding a spare to a degraded array.
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index b97cd51be8f8ece6f97cb338e8b0230ec1d8c8d3..79ec5e294bc22bb7ebae7bf8e8f22ff6ed709085 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -438,6 +438,15 @@ extern struct superswitch {
        void (*process_update)(struct supertype *st,
                               struct metadata_update *update);
 
+       /* activate_spare will check if the array is degraded and, if it
+        * is, try to find some spare space in the container.
+        * On success, it add appropriate updates (For process_update) to
+        * to the 'updates' list and returns a list of 'mdinfo' identifying
+        * the device, or devices as there might be multiple missing
+        * devices and multiple spares available.
+        */
+       struct mdinfo *(*activate_spare)(struct active_array *a,
+                                        struct metadata_update **updates);
 
        int major;
        int swapuuid; /* true if uuid is bigending rather than hostendian */