summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-09-28 12:12:06 -0700
committerDan Williams <dan.j.williams@intel.com>2008-10-15 14:15:51 -0700
commit7146ec6a1efbd36087c406d0fe63480ec49da599 (patch)
treee9e221084e3849858b81887aeb8b18c33582e5c6 /Monitor.c
parent0dd3ba30aa1fbab2d7e62fca5169789ceb62b3f1 (diff)
downloadmdadm-7146ec6a1efbd36087c406d0fe63480ec49da599.tar.gz
mdadm-7146ec6a1efbd36087c406d0fe63480ec49da599.tar.xz
mdadm-7146ec6a1efbd36087c406d0fe63480ec49da599.zip
Extend --wait-clean to checkpoint resync
Root file systems backed by external metadata arrays need to be explicitly checkpointed near the time the rootfs is marked readonly as userspace will not have an opportunity to react to the final shutdown of the array. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Monitor.c b/Monitor.c
index 8d8939c..a080390 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -686,6 +686,9 @@ int WaitClean(char *dev)
tm.tv_sec = 5;
tm.tv_usec = 0;
+ /* give mdmon a chance to checkpoint resync */
+ sysfs_set_str(mdi, NULL, "sync_action", "idle");
+
FD_ZERO(&fds);
/* wait for array_state to be clean */