Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=1cebece3e9…
Commit: 1cebece3e922bfffa52f58ac6594700764868771
Parent: a3ab08213c87313ec899c114c23650d05268eef5
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Mar 1 16:03:52 2013 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue May 14 14:05:11 2013 +0100
libgfs2: Remove 'writes' field from gfs2_sbd
This was only used to print out how many writes mkfs.gfs2 had made
during its run in debug mode, which doesn't really make sense any more
as we don't use bwrite for much of the mkfs process now.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/buf.c | 1 -
gfs2/libgfs2/libgfs2.h | 1 -
gfs2/mkfs/main_mkfs.c | 5 -----
3 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/buf.c b/gfs2/libgfs2/buf.c
index 68f0731..6fcdd17 100644
--- a/gfs2/libgfs2/buf.c
+++ b/gfs2/libgfs2/buf.c
@@ -80,7 +80,6 @@ int bwrite(struct gfs2_buffer_head *bh)
if (pwritev(sdp->device_fd, &bh->iov, 1, bh->b_blocknr * sdp->bsize) != bh->iov.iov_len)
return -1;
- sdp->writes++;
bh->b_modified = 0;
return 0;
}
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 7d2d9ff..e069e9d 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -311,7 +311,6 @@ struct gfs2_sbd {
struct gfs2_inode *master_dir;
struct master_dir md;
- unsigned int writes;
int metafs_fd;
char metafs_path[PATH_MAX]; /* where metafs is mounted */
struct special_blocks eattr_blocks;
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 6471600..864ff98 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -583,15 +583,10 @@ static void print_results(struct gfs2_sbd *sdp, uint64_t real_device_size,
printf("%-27s%llu\n", _("Resource groups:"), (unsigned long long)sdp->rgrps);
printf("%-27s\"%s\"\n", _("Locking protocol:"), sdp->lockproto);
printf("%-27s\"%s\"\n", _("Lock table:"), sdp->locktable);
-
- if (opts->debug) {
- printf("%-27s%u\n", _("Writes:"), sdp->writes);
- }
/* Translators: "UUID" = universally unique identifier. */
printf("%-27s%s\n", _("UUID:"), str_uuid(uuid));
}
-
/**
* If path is a symlink, return 1 with *abspath pointing to the absolute path,
* otherwise return 0. Exit on errors. The caller must free the memory pointed
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=62a5ab048683b…
Commit: 62a5ab048683b4ce77f0eeaba81d3330da574d41
Parent: 8b67fbb6e5e95510fcecbdd5cd5a91aa88f97750
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jan 4 11:44:13 2013 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri May 10 09:41:41 2013 -0500
fenced/dlm_controld/gfs_controld: use cluster_dead for corosync connections
corosync connections are supposed to use the
cluster_dead() function, not the client_dead()
function. The client_dead() function closes
the fd directly, which in the case of corosync
connections, fouls up the ipc, because the ipc
is still expecting to use that fd, which the
daemon has reused for something else. The next
time the daemon calls into corosync ipc, it gets
stuck in a poll/futex loop as the lib attempts
to use the fd that fenced has wrongly closed.
bz 888857
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
fence/fenced/cpg.c | 2 +-
group/dlm_controld/cpg.c | 2 +-
group/gfs_controld/cpg-new.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/fenced/cpg.c b/fence/fenced/cpg.c
index 6634f8c..a5a4208 100644
--- a/fence/fenced/cpg.c
+++ b/fence/fenced/cpg.c
@@ -1748,7 +1748,7 @@ int fd_join(struct fd *fd)
cpg_fd_get(cpg_handle_domain, &cpg_fd_domain);
- ci = client_add(cpg_fd_domain, process_cpg_domain, NULL);
+ ci = client_add(cpg_fd_domain, process_cpg_domain, cluster_dead);
list_add(&fd->list, &domains);
fd->cpg_handle = cpg_handle_domain;
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 4463f4d..6a4023b 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1822,7 +1822,7 @@ int dlm_join_lockspace(struct lockspace *ls)
cpg_fd_get(h, &fd);
- ci = client_add(fd, process_cpg_lockspace, NULL);
+ ci = client_add(fd, process_cpg_lockspace, cluster_dead);
list_add(&ls->list, &lockspaces);
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index 0cdfaae..537624d 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -2773,7 +2773,7 @@ int gfs_join_mountgroup(struct mountgroup *mg)
cpg_fd_get(h, &fd);
- ci = client_add(fd, process_cpg_mountgroup, NULL);
+ ci = client_add(fd, process_cpg_mountgroup, cluster_dead);
mg->cpg_handle = h;
mg->cpg_client = ci;
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=8b67fbb6e5e95…
Commit: 8b67fbb6e5e95510fcecbdd5cd5a91aa88f97750
Parent: f50e499e44e5c7f1920e93c9b26b61c8c8468d48
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 3 13:35:54 2013 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu May 9 10:13:16 2013 -0500
gfs_controld: avoid mismatching messages with old cgs
Only match start messages with cg's that are newer than
previously matched cg's for the node.
bz 889564
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/gfs_controld/cpg-new.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index fd20250..0cdfaae 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -121,6 +121,7 @@ struct node {
int failed_reason;
uint32_t added_seq;
uint32_t removed_seq;
+ uint32_t last_match_seq;
uint64_t add_time;
int withdraw;
@@ -1001,6 +1002,15 @@ static int match_change(struct mountgroup *mg, struct change *cg,
return 0;
}
+ /* if we matched the last start message from this node against our
+ cg N, then don't match this stsart message against an earlier cg */
+
+ if (node->last_match_seq > cg->seq) {
+ log_debug("match_change %d:%u skip cg %u last matched cg %u",
+ hd->nodeid, seq, cg->seq, node->last_match_seq);
+ return 0;
+ }
+
/* verify this is the right change by matching the counts
and the nodeids of the current members */
@@ -1035,6 +1045,8 @@ static int match_change(struct mountgroup *mg, struct change *cg,
if (members_mismatch)
return 0;
+ node->last_match_seq = cg->seq;
+
log_group(mg, "match_change %d:%u matches cg %u", hd->nodeid, seq,
cg->seq);
return 1;