Whamcloud - gitweb
LU-8348 recovery: don't send last_committed after panic 60/21060/2
authorAlexey Lyashkov <alexey.lyashkov@seagate.com>
Wed, 29 Jun 2016 11:36:31 +0000 (14:36 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 10 Sep 2016 03:23:26 +0000 (03:23 +0000)
Do not update last_committed if we are not sure the
commit was successful.

Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Seagate-bug-id: MRP-3013
Change-Id: I176b86a01cac46bd7d6af85843135a57a3df0e87
Reviewed-on: http://review.whamcloud.com/21060
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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);
 
        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. */
        /* 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. */