Whamcloud - gitweb
LU-1445 osp: rollover to the new seq synchronously
[fs/lustre-release.git] / lustre / ofd / ofd_objects.c
index 1dd1abb..9ee20c4 100644 (file)
@@ -146,7 +146,7 @@ void ofd_object_put(const struct lu_env *env, struct ofd_object *fo)
 }
 
 int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
-                         obd_id id, struct ofd_seq *oseq, int nr)
+                         obd_id id, struct ofd_seq *oseq, int nr, int sync)
 {
        struct ofd_thread_info  *info = ofd_info(env);
        struct ofd_object       *fo = NULL;
@@ -228,6 +228,8 @@ int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
        if (IS_ERR(th))
                GOTO(out, rc = PTR_ERR(th));
 
+       th->th_sync |= sync;
+
        rc = dt_declare_record_write(env, oseq->os_lastid_obj, sizeof(tmp),
                                     info->fti_off, th);
        if (rc)