summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-04-24 11:42:42 +1000
committerNeilBrown <neilb@suse.de>2013-04-24 11:42:42 +1000
commitb6d428c669159b8cfa5a83bb11abaaf4bdc170b0 (patch)
tree1a26706aa57cc2bf4493951d564add73d2631335 /drivers/md/md.c
parent7ceb17e87bde79d285a8b988cfed9eaeebe60b86 (diff)
downloadop-kernel-dev-b6d428c669159b8cfa5a83bb11abaaf4bdc170b0.zip
op-kernel-dev-b6d428c669159b8cfa5a83bb11abaaf4bdc170b0.tar.gz
md: don't update metadata when stopping a read-only array.
read-only arrays should stay that way as much as possible. Updating the metadata - which could be triggered by a re-add while assembling the array metadata - should be avoided. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 491afda..3013228 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5293,7 +5293,8 @@ static void __md_stop_writes(struct mddev *mddev)
bitmap_flush(mddev);
md_super_wait(mddev);
- if (!mddev->in_sync || mddev->flags) {
+ if (mddev->ro == 0 &&
+ (!mddev->in_sync || mddev->flags)) {
/* mark array as shutdown cleanly */
mddev->in_sync = 1;
md_update_sb(mddev, 1);
OpenPOWER on IntegriCloud