From 886e67d4fe87d293952a11e7f41b98a8c3abeddd Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Wed, 19 Oct 2011 16:54:26 -0700 Subject: [PATCH 1/1] LU-699 tests: replay-dual test_1 failure The root cause of this problem is due to data corruption on lustre_disk_data. In ldd_write(), it just waits for log to be committed but NOT data to actually write to disk. So in this test case, if the data is not written into disk when we mark the device as readonly, the data will be lost and cause remount mdt failed. Change-Id: I8c46a925ce2df3d2db69b1e7fd8813eb0668401d Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/1557 Reviewed-by: Andreas Dilger Tested-by: Hudson --- lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 15f50c4..4a8b91f 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -355,7 +355,7 @@ static int ldd_write(struct lvfs_run_ctxt *mount_ctxt, push_ctxt(&saved, mount_ctxt, NULL); - file = filp_open(MOUNT_DATA_FILE, O_RDWR, 0644); + file = filp_open(MOUNT_DATA_FILE, O_RDWR|O_SYNC, 0644); if (IS_ERR(file)) { rc = PTR_ERR(file); CERROR("cannot open %s: rc = %d\n", MOUNT_DATA_FILE, rc); -- 1.8.3.1