Whamcloud - gitweb
EX-7849 quota: extra debug messages
authorSergey Cheremencev <scherementsev@ddn.com>
Tue, 24 Oct 2023 23:55:20 +0000 (03:55 +0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 5 Nov 2023 10:41:25 +0000 (10:41 +0000)
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 <scherementsev@ddn.com>
Change-Id: I05377222e1887b660f759ed11de53cd9e4023ed1
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52906
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/quota/lquota_entry.c
lustre/quota/lquota_internal.h

index ae495d8..e52e832 100644 (file)
@@ -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);
 }
index 2a63af3..e7d1496 100644 (file)
@@ -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)