aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-09-07 03:02:47 -0400
committerNeilBrown <neilb@suse.de>2010-09-16 23:53:13 -0400
commit126925c090155f13e90b9e7e8c4010e96027c00a (patch)
treef433e7cbd6aba7096a88cc7286b05e0c467ee43d /drivers/md
parent9c03f1622af051004416dd3e24d8a0fa31e34178 (diff)
md: call md_update_sb even for 'external' metadata arrays.
Now that we depend on md_update_sb to clear variable bits in mddev->flags (rather than trying not to set them) it is important to always call md_update_sb when appropriate. md_check_recovery has this job but explicitly avoids it for ->external metadata arrays. This is not longer appropraite, or needed. However we do want to avoid taking the mddev lock if only MD_CHANGE_PENDING is set as that is not cleared by md_update_sb for external-metadata arrays. Reported-by: "Kwolek, Adam" <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 43cf9cc9c1df..bdd9bba577b0 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7069,7 +7069,7 @@ void md_check_recovery(mddev_t *mddev)
7069 if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) 7069 if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
7070 return; 7070 return;
7071 if ( ! ( 7071 if ( ! (
7072 (mddev->flags && !mddev->external) || 7072 (mddev->flags & ~ (1<<MD_CHANGE_PENDING)) ||
7073 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) || 7073 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) ||
7074 test_bit(MD_RECOVERY_DONE, &mddev->recovery) || 7074 test_bit(MD_RECOVERY_DONE, &mddev->recovery) ||
7075 (mddev->external == 0 && mddev->safemode == 1) || 7075 (mddev->external == 0 && mddev->safemode == 1) ||