Whamcloud - gitweb
LU-7883 llog: Flush out journal callback data 05/19005/3
authorYang Sheng <yang.sheng@intel.com>
Fri, 18 Mar 2016 13:53:12 +0000 (21:53 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Mar 2016 18:45:44 +0000 (18:45 +0000)
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 <yang.sheng@intel.com>
Change-Id: I25c3a5d5a6184b4f51f29948af9c3c0dff1abfaa
Reviewed-on: http://review.whamcloud.com/19005
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog_test.c

index b0737f3..befea8d 100644 (file)
@@ -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;