diff options
author | Neil Brown <neilb@suse.de> | 2008-06-12 10:13:23 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-06-12 10:13:23 +1000 |
commit | 2e735d198233a67f305862f72e3a5d0f0c3c548c (patch) | |
tree | 8dad807f9ed77f623ad5cf70900eab23054a552e /monitor.c | |
parent | b22806772072a3c9a3a7fa406fb573294cb4388b (diff) | |
download | mdadm-2e735d198233a67f305862f72e3a5d0f0c3c548c.tar.gz mdadm-2e735d198233a67f305862f72e3a5d0f0c3c548c.tar.xz mdadm-2e735d198233a67f305862f72e3a5d0f0c3c548c.zip |
Allow passing metadata update to the monitor.
Code in manager can now just call queue_metadata_update with a
(freeable) buf holding the update, and it will get passed to the
monitor and written out.
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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; |