From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2] Don't hold rgrps over transactions
Date: Tue, 13 Nov 2007 13:23:28 +0000 [thread overview]
Message-ID: <1194960208.1068.782.camel@quoit> (raw)
In-Reply-To: <1194959725.1068.761.camel@quoit>
From 2bdc85e19200bc7e59bdd51364a821e239a0c786 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Fri, 9 Nov 2007 11:24:50 +0000
Subject: [PATCH] [GFS2] Don't hold rgrps over transactions
We don't need to hold rgrps over transactions because we know that
the rgrp glock must be held, and the only way that the rgrp glock
can be dropped is if the log is flushed, the removing the need to
hold the rgrp at this point in time.
Thus we can remove this from the journaling code to clean/speed
it up.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 29a8689..8baf3d1 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -470,7 +470,6 @@ static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
gfs2_log_unlock(sdp);
return;
}
- gfs2_rgrp_bh_hold(rgd);
sdp->sd_log_num_rg++;
list_add(&le->le_list, &sdp->sd_log_le_rg);
gfs2_log_unlock(sdp);
@@ -487,7 +486,6 @@ static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
sdp->sd_log_num_rg--;
gfs2_rgrp_repolish_clones(rgd);
- gfs2_rgrp_bh_put(rgd);
}
gfs2_assert_warn(sdp, !sdp->sd_log_num_rg);
}
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 09848aa..e3aa664 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -750,16 +750,6 @@ fail:
return error;
}
-void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd)
-{
- struct gfs2_sbd *sdp = rgd->rd_sbd;
-
- spin_lock(&sdp->sd_rindex_spin);
- gfs2_assert_warn(rgd->rd_sbd, rgd->rd_bh_count);
- rgd->rd_bh_count++;
- spin_unlock(&sdp->sd_rindex_spin);
-}
-
/**
* gfs2_rgrp_bh_put - Release RG bitmaps read in with gfs2_rgrp_bh_get()
* @rgd: the struct gfs2_rgrpd describing the RG to read in
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index b4c6adf..6d98f2a 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -24,7 +24,6 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp);
int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh);
int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd);
-void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd);
void gfs2_rgrp_bh_put(struct gfs2_rgrpd *rgd);
void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
--
1.5.1.2
next prev parent reply other threads:[~2007-11-13 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 13:15 [Cluster-devel] [GFS2] Various patches Steven Whitehouse
2007-11-13 13:20 ` [Cluster-devel] [GFS2] Don't add glocks to the journal Steven Whitehouse
2007-11-13 13:20 ` [Cluster-devel] [GFS2] Use atomic_t for journal free blocks counter Steven Whitehouse
2007-11-13 13:21 ` [Cluster-devel] [GFS2] Move gfs2_logd into log.c Steven Whitehouse
2007-11-13 13:22 ` [Cluster-devel] [GFS2] Don't periodically update the jindex Steven Whitehouse
2007-11-13 13:22 ` [Cluster-devel] [GFS2] Introduce two log thresholds Steven Whitehouse
2007-11-13 13:23 ` Steven Whitehouse [this message]
2007-11-13 13:34 ` [Cluster-devel] [GFS2] Update journal wake up/flushing 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=1194960208.1068.782.camel@quoit \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.