diff options
author | NeilBrown <neilb@suse.de> | 2010-06-01 09:37:26 (GMT) |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-07-26 02:52:27 (GMT) |
commit | 676e42d896ab6967859fabbb06f4e11b9615cbcf (patch) | |
tree | efab4dffe8e930ec9ef51a5a4d4fd04ffe3749b1 /drivers/md/md.c | |
parent | f4be6b43f1ac60dff00ef0923ee43b0e08872947 (diff) | |
download | linux-fsl-qoriq-676e42d896ab6967859fabbb06f4e11b9615cbcf.tar.xz |
md: be more careful setting MD_CHANGE_CLEAN
When MD_CHANGE_CLEAN is set we might block in md_write_start.
So we should only set it when fairly sure that something will clear
it.
There are two places where it is set so as to encourage a metadata
update to record the progress of resync/recovery. This should only
be done if the internal metadata update mechanisms are in use, which
can be tested by by inspecting '->persistent'.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9007651..d636b0a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6753,7 +6753,8 @@ void md_do_sync(mddev_t *mddev) atomic_read(&mddev->recovery_active) == 0); mddev->curr_resync_completed = mddev->curr_resync; - set_bit(MD_CHANGE_CLEAN, &mddev->flags); + if (mddev->persistent) + set_bit(MD_CHANGE_CLEAN, &mddev->flags); sysfs_notify(&mddev->kobj, NULL, "sync_completed"); } |