From: Jinshan Xiong Date: Wed, 19 Oct 2011 23:54:26 +0000 (-0700) Subject: LU-699 tests: replay-dual test_1 failure X-Git-Tag: 2.1.51~13 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=886e67d4fe87d293952a11e7f41b98a8c3abeddd 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 --- 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);