From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] gfs2: Change more BUG_ON to GLOCK_BUG_ON
Date: Mon, 24 Jan 2022 09:36:57 -0500 [thread overview]
Message-ID: <20220124143657.550918-1-rpeterso@redhat.com> (raw)
This patch changes some BUG_ON calls to GLOCK_BUG_ON so we get more
information to help with debugging when reservation problems occur.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/rgrp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 9b04a570c582..e14520b451db 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -49,7 +49,7 @@ static inline struct gfs2_bitmap *rbm_bi(const struct gfs2_rbm *rbm)
static inline u64 gfs2_rbm_to_block(const struct gfs2_rbm *rbm)
{
- BUG_ON(rbm->offset >= rbm->rgd->rd_data);
+ GLOCK_BUG_ON(rbm->rgd->rd_gl, rbm->offset >= rbm->rgd->rd_data);
return rbm->rgd->rd_data0 + (rbm_bi(rbm)->bi_start * GFS2_NBBY) +
rbm->offset;
}
@@ -1492,7 +1492,7 @@ static void rs_insert(struct gfs2_inode *ip)
struct gfs2_blkreserv *rs = &ip->i_res;
struct gfs2_rgrpd *rgd = rs->rs_rgd;
- BUG_ON(gfs2_rs_active(rs));
+ GLOCK_BUG_ON(rgd->rd_gl, gfs2_rs_active(rs));
spin_lock(&rgd->rd_rsspin);
newn = &rgd->rd_rstree.rb_node;
@@ -2426,7 +2426,7 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks,
u32 minext = 1;
int error = -ENOSPC;
- BUG_ON(ip->i_res.rs_reserved < *nblocks);
+ GLOCK_BUG_ON(rbm.rgd->rd_gl, ip->i_res.rs_reserved < *nblocks);
rgrp_lock_local(rbm.rgd);
if (gfs2_rs_active(&ip->i_res)) {
--
2.34.1
reply other threads:[~2022-01-24 14:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220124143657.550918-1-rpeterso@redhat.com \
--to=rpeterso@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).