Whamcloud - gitweb
LU-9699 osp: don't assert on OSP duplicating
[fs/lustre-release.git] / lustre / mgs / mgs_llog.c
index 23890f8..9966018 100644 (file)
@@ -2543,6 +2543,11 @@ static int mgs_write_log_mdc_to_lmv(const struct lu_env *env,
        if (rc)
                GOTO(out_free, rc);
 
+       rc = mgs_modify(env, mgs, fsdb, mti, logname, mti->mti_svname,
+                       "add mdc", CM_SKIP);
+       if (rc < 0)
+               GOTO(out_free, rc);
+
        rc = record_start_log(env, mgs, &llh, logname);
        if (rc)
                GOTO(out_free, rc);
@@ -2689,6 +2694,11 @@ static int mgs_write_log_osp_to_mdt(const struct lu_env *env,
        if (rc)
                GOTO(out_destory, rc);
 
+       rc = mgs_modify(env, mgs, fsdb, mti, logname, mti->mti_svname,
+                       "add osp", CM_SKIP);
+       if (rc < 0)
+               GOTO(out_destory, rc);
+
        rc = record_start_log(env, mgs, &llh, logname);
        if (rc)
                GOTO(out_destory, rc);