public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: master - gfs_controld: register with dlm_controld earlier Date: Thu, 07 Aug 2008 04:34:00 -0000 [thread overview] Message-ID: <20080806210328.0F0E712003F@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3049d1173834e0916ae25182f9d4fec626042d17 Commit: 3049d1173834e0916ae25182f9d4fec626042d17 Parent: 0e44be6d98d7691c5bcadf49ba11b668774bfebc Author: David Teigland <teigland@redhat.com> AuthorDate: Wed Aug 6 15:53:37 2008 -0500 Committer: David Teigland <teigland@redhat.com> CommitterDate: Wed Aug 6 15:53:37 2008 -0500 gfs_controld: register with dlm_controld earlier dlm_controld now allows us to register interest in a lockspace before the lockspace is created, so do it right away instead of after mount(2) completes, which has the potential of being too late. Signed-off-by: David Teigland <teigland@redhat.com> --- group/gfs_controld/cpg-new.c | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c index b7d1f35..d72d907 100644 --- a/group/gfs_controld/cpg-new.c +++ b/group/gfs_controld/cpg-new.c @@ -1245,19 +1245,8 @@ static void save_message(struct mountgroup *mg, struct gfs_header *hd, int len) list_add_tail(&sm->list, &cg->saved_messages); } -/* We can't register with dlm_controld until dlm_controld knows about this - lockspace. We know that it will when the kernel mount completes. */ - void gfs_mount_done(struct mountgroup *mg) { - int rv; - - if (!mg->kernel_mount_error) { - rv = dlmc_fs_register(dlmcontrol_fd, mg->name); - if (rv) - log_error("dlmc_fs_register %s error %d", mg->name, rv); - } - send_mount_done(mg, mg->kernel_mount_error); } @@ -2217,6 +2206,7 @@ static void confchg_cb(cpg_handle_t handle, struct cpg_name *group_name, /* we called cpg_leave(), and this should be the final cpg callback we receive */ log_group(mg, "confchg for our leave"); + dlmc_fs_unregister(dlmcontrol_fd, mg->name); cpg_finalize(mg->cpg_handle); client_dead(mg->cpg_client); list_del(&mg->list); @@ -2326,7 +2316,15 @@ int gfs_join_mountgroup(struct mountgroup *mg) cpg_error_t error; cpg_handle_t h; struct cpg_name name; - int i = 0, fd, ci; + int i = 0, fd, ci, rv; + + /* I think this registration with dlm_controld could be done + just about anywhere before we do the mount(2). */ + rv = dlmc_fs_register(dlmcontrol_fd, mg->name); + if (rv) { + log_error("dlmc_fs_register failed %d", rv); + return rv; + } error = cpg_initialize(&h, &cpg_callbacks); if (error != CPG_OK) { @@ -2371,6 +2369,7 @@ int gfs_join_mountgroup(struct mountgroup *mg) client_dead(ci); cpg_finalize(h); fail: + dlmc_fs_unregister(dlmcontrol_fd, mg->name); return -ENOTCONN; }
reply other threads:[~2008-08-06 21:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080806210328.0F0E712003F@lists.fedorahosted.org \ --to=teigland@fedoraproject.org \ --cc=cluster-cvs-relay@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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).