diff options
author | Bob Peterson <rpeterso@redhat.com> | 2017-01-25 20:50:47 +0300 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-01-27 16:20:13 +0300 |
commit | 9862ca056e654633e521b303f74fb123f7f17e98 (patch) | |
tree | 313e2ce19c02ded366c2974f9480fc94e96cb430 /fs/gfs2/log.c | |
parent | b63f5e84826b3e1ae81e051a6a7c5a94b657aecb (diff) | |
download | linux-9862ca056e654633e521b303f74fb123f7f17e98.tar.xz |
GFS2: Switch tr_touched to flag in transaction
This patch eliminates the int variable tr_touched in favor of a
new flag in the transaction. This is a step toward reducing contention
on the gfs2_log_lock spin_lock.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r-- | fs/gfs2/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 5028a9d00c17..4fb76c04e65b 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -799,7 +799,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, static void gfs2_merge_trans(struct gfs2_trans *old, struct gfs2_trans *new) { - WARN_ON_ONCE(old->tr_attached != 1); + WARN_ON_ONCE(!test_bit(TR_ATTACHED, &old->tr_flags)); old->tr_num_buf_new += new->tr_num_buf_new; old->tr_num_databuf_new += new->tr_num_databuf_new; @@ -823,9 +823,9 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) if (sdp->sd_log_tr) { gfs2_merge_trans(sdp->sd_log_tr, tr); } else if (tr->tr_num_buf_new || tr->tr_num_databuf_new) { - gfs2_assert_withdraw(sdp, tr->tr_alloced); + gfs2_assert_withdraw(sdp, test_bit(TR_ALLOCED, &tr->tr_flags)); sdp->sd_log_tr = tr; - tr->tr_attached = 1; + set_bit(TR_ATTACHED, &tr->tr_flags); } sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; |