diff options
author | Bob Peterson <rpeterso@redhat.com> | 2019-03-26 13:51:48 -0600 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-06-27 21:03:53 +0200 |
commit | e955537e3262de8e56f070b13817f525f472fa00 (patch) | |
tree | d32fa4ef25a5a0da2ddebe93b3ee2b743b37e838 /fs/gfs2/trans.c | |
parent | 5b3a9f348bc58f0e13cebcf3e583c7d2f2499d6a (diff) | |
download | linux-e955537e3262de8e56f070b13817f525f472fa00.tar.gz linux-e955537e3262de8e56f070b13817f525f472fa00.tar.bz2 linux-e955537e3262de8e56f070b13817f525f472fa00.zip |
gfs2: eliminate tr_num_revoke_rm
For its journal processing, gfs2 kept track of the number of buffers
added and removed on a per-transaction basis. These values are used
to calculate space needed in the journal. But while these calculations
make sense for the number of buffers, they make no sense for revokes.
Revokes are managed in their own list, linked from the superblock.
So it's entirely unnecessary to keep separate per-transaction counts
for revokes added and removed. A single count will do the same job.
Therefore, this patch combines the transaction revokes into a single
count.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 6f67ef7aa412..35e3059255fe 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -77,10 +77,10 @@ static void gfs2_print_trans(struct gfs2_sbd *sdp, const struct gfs2_trans *tr) fs_warn(sdp, "blocks=%u revokes=%u reserved=%u touched=%u\n", tr->tr_blocks, tr->tr_revokes, tr->tr_reserved, test_bit(TR_TOUCHED, &tr->tr_flags)); - fs_warn(sdp, "Buf %u/%u Databuf %u/%u Revoke %u/%u\n", + fs_warn(sdp, "Buf %u/%u Databuf %u/%u Revoke %u\n", tr->tr_num_buf_new, tr->tr_num_buf_rm, tr->tr_num_databuf_new, tr->tr_num_databuf_rm, - tr->tr_num_revoke, tr->tr_num_revoke_rm); + tr->tr_num_revoke); } void gfs2_trans_end(struct gfs2_sbd *sdp) @@ -263,7 +263,7 @@ void gfs2_trans_remove_revoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len) gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke); sdp->sd_log_num_revoke--; kmem_cache_free(gfs2_bufdata_cachep, bd); - tr->tr_num_revoke_rm++; + tr->tr_num_revoke--; if (--n == 0) break; } |