Whamcloud - gitweb
LU-8348 recovery: don't send last_committed after panic
[fs/lustre-release.git] / lustre / target / tgt_lastrcvd.c
index 55e5995..bb3c07d 100644 (file)
@@ -781,6 +781,11 @@ static void tgt_cb_last_committed(struct lu_env *env, struct thandle *th,
        LASSERT(ccb->llcc_tgt != NULL);
        LASSERT(ccb->llcc_exp->exp_obd == ccb->llcc_tgt->lut_obd);
 
+       /* error hit, don't update last committed to provide chance to
+        * replay data after fail */
+       if (err != 0)
+               goto out;
+
        /* Fast path w/o spinlock, if exp_last_committed was updated
         * with higher transno, no need to take spinlock and check,
         * also no need to update obd_last_committed. */