diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2020-10-22 20:34:29 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-17 19:26:06 +0100 |
commit | 07974d2a2a98bc3ce15f3411ebe5175c0af8f1c3 (patch) | |
tree | d410e6f7fdb7fa8e4b9d20b9be0af15aabd26c0a /fs/gfs2/trace_gfs2.h | |
parent | 0ec9b9ea4f83303bfd8f052a3d8b2bd179b002e1 (diff) |
gfs2: Rename rs_{free -> requested} and rd_{reserved -> requested}
We keep track of what we've so far been referring to as reservations in
rd_rstree: the nodes in that tree indicate where in a resource group we'd
like to allocate the next couple of blocks for a particular inode. Local
processes take those as hints, but they may still "steal" blocks from those
extents, so when actually allocating a block, we must double check in the
bitmap whether that block is actually still free. Likewise, other cluster
nodes may "steal" such blocks as well.
One of the following patches introduces resource group glock sharing, i.e.,
sharing of an exclusively locked resource group glock among local processes to
speed up allocations. To make that work, we'll need to keep track of how many
blocks we've actually reserved for each inode, so we end up with two different
kinds of reservations.
Distinguish these two kinds by referring to blocks which are reserved but may
still be "stolen" as "requested". This rename also makes it more obvious that
rs_requested and rd_requested are strongly related.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trace_gfs2.h')
-rw-r--r-- | fs/gfs2/trace_gfs2.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h index e461a691e5e8..d24bdcdd42e5 100644 --- a/fs/gfs2/trace_gfs2.h +++ b/fs/gfs2/trace_gfs2.h @@ -560,7 +560,7 @@ TRACE_EVENT(gfs2_block_alloc, __field( u8, block_state ) __field( u64, rd_addr ) __field( u32, rd_free_clone ) - __field( u32, rd_reserved ) + __field( u32, rd_requested ) ), TP_fast_assign( @@ -571,7 +571,7 @@ TRACE_EVENT(gfs2_block_alloc, __entry->block_state = block_state; __entry->rd_addr = rgd->rd_addr; __entry->rd_free_clone = rgd->rd_free_clone; - __entry->rd_reserved = rgd->rd_reserved; + __entry->rd_requested = rgd->rd_requested; ), TP_printk("%u,%u bmap %llu alloc %llu/%lu %s rg:%llu rf:%u rr:%lu", @@ -581,7 +581,7 @@ TRACE_EVENT(gfs2_block_alloc, (unsigned long)__entry->len, block_state_name(__entry->block_state), (unsigned long long)__entry->rd_addr, - __entry->rd_free_clone, (unsigned long)__entry->rd_reserved) + __entry->rd_free_clone, (unsigned long)__entry->rd_requested) ); /* Keep track of multi-block reservations as they are allocated/freed */ @@ -595,10 +595,10 @@ TRACE_EVENT(gfs2_rs, __field( dev_t, dev ) __field( u64, rd_addr ) __field( u32, rd_free_clone ) - __field( u32, rd_reserved ) + __field( u32, rd_requested ) __field( u64, inum ) __field( u64, start ) - __field( u32, free ) + __field( u32, requested ) __field( u8, func ) ), @@ -606,11 +606,11 @@ TRACE_EVENT(gfs2_rs, __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->rd_requested = rs->rs_rgd->rd_requested; __entry->inum = container_of(rs, struct gfs2_inode, i_res)->i_no_addr; __entry->start = rs->rs_start; - __entry->free = rs->rs_free; + __entry->requested = rs->rs_requested; __entry->func = func; ), @@ -620,8 +620,8 @@ TRACE_EVENT(gfs2_rs, (unsigned long long)__entry->start, (unsigned long long)__entry->rd_addr, (unsigned long)__entry->rd_free_clone, - (unsigned long)__entry->rd_reserved, - rs_func_name(__entry->func), (unsigned long)__entry->free) + (unsigned long)__entry->rd_requested, + rs_func_name(__entry->func), (unsigned long)__entry->requested) ); #endif /* _TRACE_GFS2_H */ |