summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trace_gfs2.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-10-11 18:56:40 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2021-01-18 16:56:36 +0100
commitc65b76b893032a9fa69056656c771f5e2fc9ef0c (patch)
tree0bfd19a2bd528863574478f366570d1262d0ae67 /fs/gfs2/trace_gfs2.h
parent0eacdd16adc425e61926876f15b58008aa5c4784 (diff)
downloadlinux-c65b76b893032a9fa69056656c771f5e2fc9ef0c.tar.bz2
gfs2: Only use struct gfs2_rbm for bitmap manipulations
GFS2 uses struct gfs2_rbm to represent a filesystem block number as a bit position within a resource group. This representation is used in the bitmap manipulation code to prevent excessive conversions between block numbers and bit positions, but also in struct gfs2_blkreserv which is part of struct gfs2_inode, to mark the start of a reservation. In the inode, the bit position representation makes less sense: first, the start position is used as a block number about as often as a bit position; second, the bit position representation makes the code unnecessarily complicated and difficult to read. Therefore, change struct gfs2_blkreserv to represent the start of a reservation as a block number instead of a bit position. (This requires keeping track of the resource group in gfs2_blkreserv separately.) With that change, various things can be slightly simplified, and struct gfs2_rbm can be moved to rgrp.c. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trace_gfs2.h')
-rw-r--r--fs/gfs2/trace_gfs2.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index 0b2f858d9a8c..e461a691e5e8 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -603,13 +603,13 @@ TRACE_EVENT(gfs2_rs,
),
TP_fast_assign(
- __entry->dev = rs->rs_rbm.rgd->rd_sbd->sd_vfs->s_dev;
- __entry->rd_addr = rs->rs_rbm.rgd->rd_addr;
- __entry->rd_free_clone = rs->rs_rbm.rgd->rd_free_clone;
- __entry->rd_reserved = rs->rs_rbm.rgd->rd_reserved;
+ __entry->dev = rs->rs_rgd->rd_sbd->sd_vfs->s_dev;
+ __entry->rd_addr = rs->rs_rgd->rd_addr;
+ __entry->rd_free_clone = rs->rs_rgd->rd_free_clone;
+ __entry->rd_reserved = rs->rs_rgd->rd_reserved;
__entry->inum = container_of(rs, struct gfs2_inode,
i_res)->i_no_addr;
- __entry->start = gfs2_rbm_to_block(&rs->rs_rbm);
+ __entry->start = rs->rs_start;
__entry->free = rs->rs_free;
__entry->func = func;
),