* [Cluster-devel] [PATCH] gfs2: Change more BUG_ON to GLOCK_BUG_ON
@ 2022-01-24 14:36 Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2022-01-24 14:36 UTC (permalink / raw)
To: cluster-devel.redhat.com
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-24 14:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-24 14:36 [Cluster-devel] [PATCH] gfs2: Change more BUG_ON to GLOCK_BUG_ON Bob Peterson
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).