From: Sergey Cheremencev Date: Tue, 24 Oct 2023 23:55:20 +0000 (+0400) Subject: EX-7849 quota: extra debug messages X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=02242f6f1ba1867756ee5b91abd2207f646436cf;p=fs%2Flustre-release.git EX-7849 quota: extra debug messages Add extra debug messages into qmt to find the root cause of panic: qmt_id_lock_glimpse()) ASSERTION( lqe->lqe_gl ) Signed-off-by: Sergey Cheremencev Change-Id: I05377222e1887b660f759ed11de53cd9e4023ed1 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52906 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/quota/lquota_entry.c b/lustre/quota/lquota_entry.c index ae495d8..e52e832 100644 --- a/lustre/quota/lquota_entry.c +++ b/lustre/quota/lquota_entry.c @@ -341,6 +341,7 @@ struct lquota_entry *lqe_locate_find(const struct lu_env *env, "hash:%s\n", qid->qid_uid, site->lqs_hash->hs_name); RETURN(ERR_PTR(-ENOMEM)); } + CDEBUG(D_QUOTA, "Allocated lqe %p\n", new); atomic_set(&new->lqe_ref, 1); /* hold 1 for caller */ new->lqe_id = *qid; @@ -365,7 +366,9 @@ struct lquota_entry *lqe_locate_find(const struct lu_env *env, if (lqe == new) new = NULL; out: - if (new) + if (new) { + CDEBUG(D_QUOTA, "new %p lqe %p\n", new, lqe); lqe_putref(new); + } RETURN(lqe); } diff --git a/lustre/quota/lquota_internal.h b/lustre/quota/lquota_internal.h index 2a63af3..e7d1496 100644 --- a/lustre/quota/lquota_internal.h +++ b/lustre/quota/lquota_internal.h @@ -276,8 +276,12 @@ static inline void lqe_putref(struct lquota_entry *lqe) { LASSERT(lqe != NULL); LASSERT(atomic_read(&lqe->lqe_ref) > 0); - if (atomic_dec_and_test(&lqe->lqe_ref)) + if (atomic_dec_and_test(&lqe->lqe_ref)) { + CDEBUG(D_QUOTA, "free lqe %p lqe_gl %d\n", lqe, lqe->lqe_gl); + if (unlikely(lqe->lqe_gl)) + dump_stack(); OBD_SLAB_FREE_PTR(lqe, lqe_kmem); + } } static inline int lqe_is_master(struct lquota_entry *lqe)