From: Yang Sheng Date: Fri, 18 Mar 2016 13:53:12 +0000 (+0800) Subject: LU-7883 llog: Flush out journal callback data X-Git-Tag: 2.8.51~6 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=97ef9af439181510cc4abce355f1833399aa9445;p=fs%2Flustre-release.git LU-7883 llog: Flush out journal callback data As LU-7329, llog_test_10 trigger OOM again. So add dt_sync on subtest beginning to flush out journal callback data accumulated by previous subtest. Test-Parameters: envdefinitions=ONLY=60a testlist=sanity,sanity,sanity,sanity,sanity,sanity Signed-off-by: Yang Sheng Change-Id: I25c3a5d5a6184b4f51f29948af9c3c0dff1abfaa Reviewed-on: http://review.whamcloud.com/19005 Tested-by: Maloo Reviewed-by: Faccini Bruno Tested-by: Jenkins Reviewed-by: Bob Glossman Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index b0737f3..befea8d 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -1480,6 +1480,15 @@ static int llog_test_10(const struct lu_env *env, struct obd_device *obd) cat_logid = cath->lgh_id; dt = lu2dt_dev(cath->lgh_obj->do_lu.lo_dev); + /* sync device to commit all recent LLOG changes to disk and avoid + * to consume a huge space with delayed journal commit callbacks + * particularly on low memory nodes or VMs */ + rc = dt_sync(env, dt); + if (rc) { + CERROR("10c: sync failed: %d\n", rc); + GOTO(out, rc); + } + /* force catalog wrap for 5th plain LLOG */ cfs_fail_loc = CFS_FAIL_SKIP|OBD_FAIL_CAT_RECORDS; cfs_fail_val = 4;