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: RHEL5 - groupd: ignore nolock gfs Date: Thu, 31 Jul 2008 17:51:00 -0000 [thread overview] Message-ID: <20080731174902.0F195A8257@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=aee3ab578619a22e03cc9c9d024647927df479b0 Commit: aee3ab578619a22e03cc9c9d024647927df479b0 Parent: bf130aa9983f13ab5b2a40181680fc2c35f1f3e1 Author: David Teigland <teigland@redhat.com> AuthorDate: Wed Jul 9 09:49:58 2008 -0500 Committer: David Teigland <teigland@redhat.com> CommitterDate: Thu Jul 31 12:40:30 2008 -0500 groupd: ignore nolock gfs bz 315741 When starting up, we look for existing, "uncontrolled" gfs file systems in the kernel (which would require the node to be rebooted.) This check needs to ignore nolock fs's. Signed-off-by: David Teigland <teigland@redhat.com> --- group/daemon/main.c | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/group/daemon/main.c b/group/daemon/main.c index 19fbf48..c80a024 100644 --- a/group/daemon/main.c +++ b/group/daemon/main.c @@ -106,6 +106,29 @@ static int do_read(int fd, void *buf, size_t count) - we won't be in groupd cpg until after we've verified there's no local residual gfs/dlm state */ +static int ignore_gfs_nolock(char *sysfs_dir, char *table) +{ + char path[PATH_MAX]; + int rv, fd; + + if (!strstr(sysfs_dir, "gfs")) + return 0; + + memset(path, 0, PATH_MAX); + + snprintf(path, PATH_MAX, "%s/%s/lock_module/proto_name", + sysfs_dir, table); + + /* lock_nolock doesn't create the "lock_module" dir at all, + so we'll fail to open this */ + + fd = open(path, O_RDONLY); + if (fd < 0) + return 1; + + return 0; +} + static int kernel_instance_count(char *sysfs_dir) { char path[PATH_MAX]; @@ -124,6 +147,9 @@ static int kernel_instance_count(char *sysfs_dir) if (de->d_name[0] == '.') continue; + if (ignore_gfs_nolock(sysfs_dir, de->d_name)) + continue; + log_print("found uncontrolled kernel object %s in %s", de->d_name, sysfs_dir); rv++; @@ -138,8 +164,6 @@ int check_uncontrolled_groups(void) char *argv[4]; int status, rv = 0; - /* FIXME: ignore gfs/gfs2 nolock fs's */ - rv += kernel_instance_count("/sys/kernel/dlm"); rv += kernel_instance_count("/sys/fs/gfs"); rv += kernel_instance_count("/sys/fs/gfs2");
reply other threads:[~2008-07-31 17:49 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=20080731174902.0F195A8257@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).