]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
FIX: External metadata sometimes is not updated
authorAdam Kwolek <adam.kwolek@intel.com>
Thu, 12 Jan 2012 07:12:39 +0000 (08:12 +0100)
committerNeilBrown <neilb@suse.de>
Mon, 30 Jan 2012 00:36:25 +0000 (11:36 +1100)
External metadata sometimes is not updated.
It can be observed during 2 raid0 arrays Capacity Expansion.
New array size is not set, because metadata is not updated and on the reshape
end mdadm doesn't read new array size from metadata.
This happens when mdmon finishes his work (due to takeover to raid0),
before all metadata updates are processed.

Make sure that all updates are flushed to disk before executing takeover.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index b2c136023aacc23144cf2f2ebd2a1efb288958da..89f563c608b7b57cfe7fcbe75fb5509944dc28af 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2396,6 +2396,7 @@ started:
                /* Re-load the metadata as much could have changed */
                int cfd = open_dev(st->container_dev);
                if (cfd >= 0) {
+                       ping_manager(container);
                        ping_monitor(container);
                        st->ss->free_super(st);
                        st->ss->load_container(st, cfd, container);