diff options
author | Bob Peterson <rpeterso@redhat.com> | 2017-01-25 12:50:47 -0500 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2017-01-27 08:20:13 -0500 |
commit | 9862ca056e654633e521b303f74fb123f7f17e98 (patch) | |
tree | 313e2ce19c02ded366c2974f9480fc94e96cb430 /fs/gfs2/meta_io.c | |
parent | b63f5e84826b3e1ae81e051a6a7c5a94b657aecb (diff) |
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/meta_io.c')
-rw-r--r-- | fs/gfs2/meta_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 373639a59782..a88a347cffe3 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -293,7 +293,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, wait_on_buffer(bh); if (unlikely(!buffer_uptodate(bh))) { struct gfs2_trans *tr = current->journal_info; - if (tr && tr->tr_touched) + if (tr && test_bit(TR_TOUCHED, &tr->tr_flags)) gfs2_io_error_bh(sdp, bh); brelse(bh); *bhp = NULL; @@ -320,7 +320,7 @@ int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh) if (!buffer_uptodate(bh)) { struct gfs2_trans *tr = current->journal_info; - if (tr && tr->tr_touched) + if (tr && test_bit(TR_TOUCHED, &tr->tr_flags)) gfs2_io_error_bh(sdp, bh); return -EIO; } @@ -346,7 +346,7 @@ void gfs2_remove_from_journal(struct buffer_head *bh, int meta) tr->tr_num_buf_rm++; else tr->tr_num_databuf_rm++; - tr->tr_touched = 1; + set_bit(TR_TOUCHED, &tr->tr_flags); was_pinned = 1; brelse(bh); } |