From f2cd05463982e2fc17d30c927065266850d55446 Mon Sep 17 00:00:00 2001 From: wang di Date: Tue, 11 Aug 2015 04:10:27 -0700 Subject: [PATCH] LU-6981 target: update obd_last_committed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lustre/target/tgt_lastrcvd.c | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- 1.8.3.1