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>
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. */