Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97254
b: refs/heads/master
c: 09a44cc
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed May 24, 2008
1 parent 8239b9f commit 8b343a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 698b18c1e8bddf39cbf1ba50792b0fe302dbe6d6
refs/heads/master: 09a44cc15079f80c1416cde1a1d5b2cdd8f2118a
11 changes: 10 additions & 1 deletion trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -5435,8 +5435,11 @@ void md_write_start(mddev_t *mddev, struct bio *bi)
md_wakeup_thread(mddev->thread);
}
spin_unlock_irq(&mddev->write_lock);
sysfs_notify(&mddev->kobj, NULL, "array_state");
}
wait_event(mddev->sb_wait, mddev->flags==0);
wait_event(mddev->sb_wait,
!test_bit(MD_CHANGE_CLEAN, &mddev->flags) &&
!test_bit(MD_CHANGE_PENDING, &mddev->flags));
}

void md_write_end(mddev_t *mddev)
Expand Down Expand Up @@ -5471,6 +5474,12 @@ void md_allow_write(mddev_t *mddev)
mddev->safemode = 1;
spin_unlock_irq(&mddev->write_lock);
md_update_sb(mddev, 0);

sysfs_notify(&mddev->kobj, NULL, "array_state");
/* wait for the dirty state to be recorded in the metadata */
wait_event(mddev->sb_wait,
!test_bit(MD_CHANGE_CLEAN, &mddev->flags) &&
!test_bit(MD_CHANGE_PENDING, &mddev->flags));
} else
spin_unlock_irq(&mddev->write_lock);
}
Expand Down

0 comments on commit 8b343a2

Please sign in to comment.