From: Patrick Farrell Date: Fri, 8 Feb 2019 17:14:06 +0000 (-0500) Subject: LU-11939 tgt: Do not assert during grant cleanup X-Git-Tag: 2.12.8~6 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=372c77f0a11573e9f8818751c24735e151aafc74;p=fs%2Flustre-release.git LU-11939 tgt: Do not assert during grant cleanup Client/server grant inconsistencies discovered during cleanup are indicative of a bug, but any problems they would cause have already occurred at this point. So do not assert during this cleanup. Lustre-change: https://review.whamcloud.com/34215 Lustre-commit: af2d3ac30eafead6b47c5db20d76433c091d89de Signed-off-by: Patrick Farrell Change-Id: Ic9b827b1005bc321a290505a368349699ddf2f38 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin Signed-off-by: Mikhail Pershin Reviewed-on: https://review.whamcloud.com/45489 Tested-by: jenkins Tested-by: Andreas Dilger --- diff --git a/lustre/target/tgt_grant.c b/lustre/target/tgt_grant.c index 9bd55f1..e522c0e 100644 --- a/lustre/target/tgt_grant.c +++ b/lustre/target/tgt_grant.c @@ -1092,22 +1092,25 @@ void tgt_grant_discard(struct obd_export *exp) tgd = &lut->lut_tgd; spin_lock(&tgd->tgd_grant_lock); - LASSERTF(tgd->tgd_tot_granted >= ted->ted_grant, - "%s: tot_granted %llu cli %s/%p ted_grant %ld\n", - obd->obd_name, tgd->tgd_tot_granted, - exp->exp_client_uuid.uuid, exp, ted->ted_grant); + if (tgd->tgd_tot_granted < ted->ted_grant) { + CERROR("%s: tot_granted %llu < cli %s/%p ted_grant %ld\n", + obd->obd_name, tgd->tgd_tot_granted, + exp->exp_client_uuid.uuid, exp, ted->ted_grant); + } tgd->tgd_tot_granted -= ted->ted_grant; ted->ted_grant = 0; - LASSERTF(tgd->tgd_tot_pending >= ted->ted_pending, - "%s: tot_pending %llu cli %s/%p ted_pending %ld\n", - obd->obd_name, tgd->tgd_tot_pending, - exp->exp_client_uuid.uuid, exp, ted->ted_pending); + if (tgd->tgd_tot_pending < ted->ted_pending) { + CERROR("%s: tot_pending %llu < cli %s/%p ted_pending %ld\n", + obd->obd_name, tgd->tgd_tot_pending, + exp->exp_client_uuid.uuid, exp, ted->ted_pending); + } /* tgd_tot_pending is handled in tgt_grant_commit as bulk * commmits */ - LASSERTF(tgd->tgd_tot_dirty >= ted->ted_dirty, - "%s: tot_dirty %llu cli %s/%p ted_dirty %ld\n", - obd->obd_name, tgd->tgd_tot_dirty, - exp->exp_client_uuid.uuid, exp, ted->ted_dirty); + if (tgd->tgd_tot_dirty < ted->ted_dirty) { + CERROR("%s: tot_dirty %llu < cli %s/%p ted_dirty %ld\n", + obd->obd_name, tgd->tgd_tot_dirty, + exp->exp_client_uuid.uuid, exp, ted->ted_dirty); + } tgd->tgd_tot_dirty -= ted->ted_dirty; ted->ted_dirty = 0; spin_unlock(&tgd->tgd_grant_lock);