]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - monitor.c
Allow passing metadata update to the monitor.
[thirdparty/mdadm.git] / monitor.c
index 4fe1cb0d761937f560a3c492cf3185b6d3eb38d9..d1f7c9e29cb6f006d0902f44f5b9f10ad225feb6 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -299,7 +299,7 @@ static int read_and_act(struct active_array *a)
                // FIXME;
        }
 
-       a->container->ss->sync_metadata(a);
+       a->container->ss->sync_metadata(a->container);
 
        /* Effect state changes in the array */
        if (a->next_state != bad_word)
@@ -492,6 +492,18 @@ static int wait_and_act(struct supertype *container, int pfd,
                }
        }
 
+       if (update_queue) {
+               struct metadata_update *this;
+
+               for (this = update_queue; this ; this = this->next)
+                       container->ss->process_update(container, this);
+
+               update_queue_handled = update_queue;
+               update_queue = NULL;
+               signal_manager();
+               container->ss->sync_metadata(container);
+       }
+
        for (a = *aap; a ; a = a->next) {
                if (a->replaces && !discard_this) {
                        struct active_array **ap;