From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 02/10] GFS2: Merge revoke adding functions
Date: Tue, 19 Feb 2013 10:07:32 +0000 [thread overview]
Message-ID: <1361268460-3092-3-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1361268460-3092-1-git-send-email-swhiteho@redhat.com>
This moves the lo_add function for revokes into trans.c, removing
a function call and making the code easier to read.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 9ceccb1..9c80742 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -600,20 +600,6 @@ static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
jd->jd_jid, sdp->sd_replayed_blocks, sdp->sd_found_blocks);
}
-static void revoke_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
-{
- struct gfs2_glock *gl = bd->bd_gl;
- struct gfs2_trans *tr;
-
- tr = current->journal_info;
- tr->tr_touched = 1;
- tr->tr_num_revoke++;
- sdp->sd_log_num_revoke++;
- atomic_inc(&gl->gl_revokes);
- set_bit(GLF_LFLUSH, &gl->gl_flags);
- list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
-}
-
static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
{
struct gfs2_meta_header *mh;
@@ -895,7 +881,6 @@ const struct gfs2_log_operations gfs2_buf_lops = {
};
const struct gfs2_log_operations gfs2_revoke_lops = {
- .lo_add = revoke_lo_add,
.lo_before_commit = revoke_lo_before_commit,
.lo_after_commit = revoke_lo_after_commit,
.lo_before_scan = revoke_lo_before_scan,
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 4136270..6f3ddbc 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -175,11 +175,19 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
+ struct gfs2_glock *gl = bd->bd_gl;
+ struct gfs2_trans *tr = current->journal_info;
+
BUG_ON(!list_empty(&bd->bd_list));
BUG_ON(!list_empty(&bd->bd_ail_st_list));
BUG_ON(!list_empty(&bd->bd_ail_gl_list));
lops_init_le(bd, &gfs2_revoke_lops);
- lops_add(sdp, bd);
+ tr->tr_touched = 1;
+ tr->tr_num_revoke++;
+ sdp->sd_log_num_revoke++;
+ atomic_inc(&gl->gl_revokes);
+ set_bit(GLF_LFLUSH, &gl->gl_flags);
+ list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
}
void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len)
--
1.7.4
next prev parent reply other threads:[~2013-02-19 10:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 10:07 [Cluster-devel] GFS2: Pre-pull patch posting (merge window) Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 01/10] GFS2: Separate LRU scanning from shrinker Steven Whitehouse
2013-02-19 10:07 ` Steven Whitehouse [this message]
2013-02-19 10:07 ` [Cluster-devel] [PATCH 03/10] GFS2: Split gfs2_trans_add_bh() into two Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 04/10] GFS2: Copy gfs2_trans_add_bh into new data/meta functions Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 05/10] GFS2: Merge gfs2_attach_bufdata() into trans.c Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 06/10] GFS2: Clean up freeze code Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 07/10] GFS2: Use ->writepages for ordered writes Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 08/10] GFS2: Split glock lru processing into two parts Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 09/10] GFS2: Get a block reservation before resizing a file Steven Whitehouse
2013-02-19 10:07 ` [Cluster-devel] [PATCH 10/10] GFS2: Reinstate withdraw ack system Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361268460-3092-3-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).