diff options
author | NeilBrown <neilb@suse.de> | 2011-03-10 15:59:24 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-10 15:59:24 +1100 |
commit | 2d4de5f9801449b6643b3095831481e28ecd2b86 (patch) | |
tree | 1216ac230417093c9542e212a8202131cf725809 | |
parent | b3cf095a94848ab497477544cab3ea80c0643ea8 (diff) | |
download | mdadm-2d4de5f9801449b6643b3095831481e28ecd2b86.tar.gz |
Grow: allow monitor thread to exit when there is nothing more to do.
When an array using native metadata is increasing in size, we don't
need to keep monitoring it after the initial 'critical section'.
So detect that case.
If a final level-change is still needed mdadm will wait for that,
otherwise it will simply exit.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Grow.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3016,6 +3016,11 @@ int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape, done = 1; break; } + if (rv == 0 && increasing && !st->ss->external) { + /* No longer need to monitor this reshape */ + done = 1; + break; + } while (rv) { unsigned long long offset; |