Whamcloud - gitweb
LU-6896 llog: update log initialization needs to be sync
[fs/lustre-release.git] / lustre / osp / osp_trans.c
index bcedee5..df648fc 100644 (file)
@@ -730,9 +730,6 @@ int osp_trans_update_request_create(struct thandle *th)
        oth->ot_our = our;
        our->our_th = oth;
 
-       if (oth->ot_super.th_sync)
-               oth->ot_our->our_flags |= UPDATE_FL_SYNC;
-
        return 0;
 }
 
@@ -1273,6 +1270,8 @@ int osp_trans_start(const struct lu_env *env, struct dt_device *dt,
 {
        struct osp_thandle      *oth = thandle_to_osp_thandle(th);
 
+       if (oth->ot_super.th_sync)
+               oth->ot_our->our_flags |= UPDATE_FL_SYNC;
        /* For remote thandle, if there are local thandle, start it here*/
        if (is_only_remote_trans(th) && oth->ot_storage_th != NULL)
                return dt_trans_start(env, oth->ot_storage_th->th_dev,