Whamcloud - gitweb
LU-6717 llog: Create update llog synchronously 78/15278/2
authorwang di <di.wang@intel.com>
Sat, 13 Jun 2015 16:14:12 +0000 (09:14 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 8 Jul 2015 17:14:33 +0000 (17:14 +0000)
Create remote update llog object synchronously, so
it will make sure the llog object exists, before
the cross-MDT operations will write any update llog
records.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I690e94e68b8b64dfe94412f58448f3867f61ff3e
Reviewed-on: http://review.whamcloud.com/15278
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog.c

index 707fde9..df98cc9 100644 (file)
@@ -800,6 +800,13 @@ int llog_open_create(const struct lu_env *env, struct llog_ctxt *ctxt,
        if (IS_ERR(th))
                GOTO(out, rc = PTR_ERR(th));
 
+       /* Create the remote update llog object synchronously, which
+        * happens during inialization process see lod_sub_prep_llog(),
+        * to make sure the update llog object is created before
+        * corss-MDT writing updates into the llog object */
+       if (dt_object_remote((*res)->lgh_obj))
+               th->th_sync = 1;
+
        th->th_wait_submit = 1;
        rc = llog_declare_create(env, *res, th);
        if (rc == 0) {