From: wang di Date: Tue, 11 Aug 2015 11:10:27 +0000 (-0700) Subject: LU-6981 target: update obd_last_committed X-Git-Tag: 2.7.59~42 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f2cd05463982e2fc17d30c927065266850d55446;p=fs%2Flustre-release.git LU-6981 target: update obd_last_committed In tgt_reply_data_init(), it should update last_committed after analyzing those reply_data, similar as tgt_server_data_init(), otherwise obd_last_committed might be smaller than the real committed transno, and then cause recovery_thread stuck in check_for_next_transno(), which rely on the correct last committed transno. Signed-off-by: wang di Change-Id: Id036c41028c5bc5bf45f6ad300756e0653929bb3 Reviewed-on: http://review.whamcloud.com/15971 Tested-by: Jenkins Reviewed-by: Mike Pershin Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Grégoire Pichon Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- diff --git a/lustre/target/tgt_lastrcvd.c b/lustre/target/tgt_lastrcvd.c index 4b5041a..2a45895 100644 --- a/lustre/target/tgt_lastrcvd.c +++ b/lustre/target/tgt_lastrcvd.c @@ -1871,6 +1871,12 @@ int tgt_reply_data_init(const struct lu_env *env, struct lu_target *tgt) spin_unlock(&tgt->lut_obd->obd_dev_lock); } + spin_lock(&tgt->lut_translock); + /* obd_last_committed is used for compatibility + * with other lustre recovery code */ + tgt->lut_obd->obd_last_committed = tgt->lut_last_transno; + spin_unlock(&tgt->lut_translock); + rc = 0; out: