From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 05/10] GFS2: Remove sysfs "done" files
Date: Wed, 16 Sep 2009 16:03:37 +0100 [thread overview]
Message-ID: <1253113422-3429-6-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1253113422-3429-5-git-send-email-swhiteho@redhat.com>
All recent userspace programs for GFS2 only require the uevents
and they don't read the (potentially racy) "done" files. This
patch removes the "done" files which are no longer used.
This also means that is it now potentially possible for a single
node to recover more than one journal at once. That won't happen
until such time as gfs_controld makes multiple requests though,
but all the kernel support is currently in place.
This also has the effect of slightly shrinking the GFS2 super
block (in core).
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/incore.h | 4 ----
fs/gfs2/ops_fstype.c | 3 +--
fs/gfs2/recovery.c | 4 +---
fs/gfs2/sys.c | 24 ------------------------
4 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 6edb423..a564ac5 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -498,14 +498,10 @@ struct gfs2_sb_host {
struct lm_lockstruct {
unsigned int ls_jid;
unsigned int ls_first;
- unsigned int ls_first_done;
unsigned int ls_nodir;
const struct lm_lockops *ls_ops;
unsigned long ls_flags;
dlm_lockspace_t *ls_dlm;
-
- int ls_recover_jid_done;
- int ls_recover_jid_status;
};
struct gfs2_sbd {
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 5c8f8cc..a3e188d 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -626,8 +626,7 @@ static void gfs2_others_may_mount(struct gfs2_sbd *sdp)
{
char *message = "FIRSTMOUNT=Done";
char *envp[] = { message, NULL };
- struct lm_lockstruct *ls = &sdp->sd_lockstruct;
- ls->ls_first_done = 1;
+
kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp);
}
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 59d2695..2aeb02d 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -431,9 +431,7 @@ static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid,
char env_jid[20];
char env_status[20];
char *envp[] = { env_jid, env_status, NULL };
- struct lm_lockstruct *ls = &sdp->sd_lockstruct;
- ls->ls_recover_jid_done = jid;
- ls->ls_recover_jid_status = message;
+
sprintf(env_jid, "JID=%d", jid);
sprintf(env_status, "RECOVERY=%s",
message == LM_RD_SUCCESS ? "Done" : "Failed");
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index be1b8ac..b9e68e6 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -326,12 +326,6 @@ static ssize_t lkfirst_show(struct gfs2_sbd *sdp, char *buf)
return sprintf(buf, "%d\n", ls->ls_first);
}
-static ssize_t first_done_show(struct gfs2_sbd *sdp, char *buf)
-{
- struct lm_lockstruct *ls = &sdp->sd_lockstruct;
- return sprintf(buf, "%d\n", ls->ls_first_done);
-}
-
static ssize_t recover_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
{
unsigned jid;
@@ -361,18 +355,6 @@ out:
return rv ? rv : len;
}
-static ssize_t recover_done_show(struct gfs2_sbd *sdp, char *buf)
-{
- struct lm_lockstruct *ls = &sdp->sd_lockstruct;
- return sprintf(buf, "%d\n", ls->ls_recover_jid_done);
-}
-
-static ssize_t recover_status_show(struct gfs2_sbd *sdp, char *buf)
-{
- struct lm_lockstruct *ls = &sdp->sd_lockstruct;
- return sprintf(buf, "%d\n", ls->ls_recover_jid_status);
-}
-
static ssize_t jid_show(struct gfs2_sbd *sdp, char *buf)
{
return sprintf(buf, "%u\n", sdp->sd_lockstruct.ls_jid);
@@ -386,10 +368,7 @@ GDLM_ATTR(block, 0644, block_show, block_store);
GDLM_ATTR(withdraw, 0644, withdraw_show, withdraw_store);
GDLM_ATTR(jid, 0444, jid_show, NULL);
GDLM_ATTR(first, 0444, lkfirst_show, NULL);
-GDLM_ATTR(first_done, 0444, first_done_show, NULL);
GDLM_ATTR(recover, 0600, NULL, recover_store);
-GDLM_ATTR(recover_done, 0444, recover_done_show, NULL);
-GDLM_ATTR(recover_status, 0444, recover_status_show, NULL);
static struct attribute *lock_module_attrs[] = {
&gdlm_attr_proto_name.attr,
@@ -397,10 +376,7 @@ static struct attribute *lock_module_attrs[] = {
&gdlm_attr_withdraw.attr,
&gdlm_attr_jid.attr,
&gdlm_attr_first.attr,
- &gdlm_attr_first_done.attr,
&gdlm_attr_recover.attr,
- &gdlm_attr_recover_done.attr,
- &gdlm_attr_recover_status.attr,
NULL,
};
--
1.6.2.5
next prev parent reply other threads:[~2009-09-16 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 15:03 [Cluster-devel] Mostly quotas Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 01/10] GFS2: Alter arguments of gfs2_quota/statfs_sync Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 02/10] GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 03/10] GFS2: Remove obsolete code in quota.c Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 04/10] GFS2: Add get_xstate quota function Steven Whitehouse
2009-09-16 15:03 ` Steven Whitehouse [this message]
2009-09-16 15:03 ` [Cluster-devel] [PATCH 06/10] GFS2: Add proper error reporting to quota sync via sysfs Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 07/10] GFS2: Remove constant argument from qdsb_get() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 08/10] GFS2: Remove constant argument from qd_get() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 09/10] GFS2: Clean up gfs2_adjust_quota() and do_glock() Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 10/10] GFS2: Add get_xquota support 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=1253113422-3429-6-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).