Whamcloud - gitweb
LU-1445 osp: rollover to the new seq synchronously
[fs/lustre-release.git] / lustre / osp / osp_object.c
index 81fa936..337b710 100644 (file)
@@ -253,6 +253,13 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt,
 
        CDEBUG(D_INODE, "fid for osp_obj %p is "DFID"!\n", osp_obj, PFID(fid));
 
+       /* If the precreate ends, it means it will be ready to rollover to
+        * the new sequence soon, all the creation should be synchronized,
+        * otherwise during replay, the replay fid will be inconsistent with
+        * last_used/create fid */
+       if (osp_precreate_end_seq(env, d) && osp_is_fid_client(d))
+               th->th_sync = 1;
+
        /*
         * it's OK if the import is inactive by this moment - id was created
         * by OST earlier, we just need to maintain it consistently on the disk