All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: gfs2-utils: master - gfs_controld: Remove three unused functions
Date: Fri, 16 Oct 2009 11:33:33 -0500	[thread overview]
Message-ID: <20091016163333.GE23459@redhat.com> (raw)
In-Reply-To: <1255708878.6052.590.camel@localhost.localdomain>

On Fri, Oct 16, 2009 at 05:01:18PM +0100, Steven Whitehouse wrote:
> Hi,
> 
> On Fri, 2009-10-16 at 10:59 -0500, David Teigland wrote:
> > On Fri, Oct 16, 2009 at 03:56:05PM +0100, Steven Whitehouse wrote:
> > > Hi,
> > > 
> > > On Wed, 2009-10-14 at 12:53 -0500, David Teigland wrote:
> > > > On Wed, Oct 14, 2009 at 02:55:04PM +0000, Steven Whitehouse wrote:
> > > > > gfs_controld: Remove three unused functions
> > > > > 
> > > > > These functions are not called from anywhere and appear
> > > > > to be left over from earlier times.
> > > > 
> > > > They were just added, but in translating the dlm_controld patch to
> > > > gfs_controld I missed the bits that called them (both in
> > > > cluster.git/STABLE3 and gfs2-utils.git)  I'll reapply this bit with the
> > > > bits that are missing.
> > > > 
> > > > Dave
> > > > 
> > > 
> > > I'm not sure I understand the purpose of this code. Is there more to
> > > come yet?
> > > 
> > > The function find_mg_id() still seems to be unused. So far as I can
> > > figure out the purpose of the new code seems to be to maintain two
> > > timestamps: cluster_add_time whose sole purpose seems to be to check
> > > against cg->create_time but I'm not quite sure why, and
> > > cluster_remove_time which seems to not do anything at all at the moment.
> > > 
> > > I can't get any clues from dlm_controld because cluster_remove_time
> > > seems to be unused there as well,
> > 
> > Right, cluster_add_time is used, but cluster_remove_time isn't, although
> > it can be very useful to know for debugging.
> > 
> > Dave
> > 
> Yes, but used for what exactly? What is the purpose of this bit of code?

This bit about cluster_add_time?

+       /* a node's start can't match a change if the node joined the cluster
+          more recently than the change was created */
+
+       node = get_node_history(mg, hd->nodeid);
+       if (!node) {
+               log_group(mg, "match_change %d:%u skip cg %u no node history",
+                         hd->nodeid, seq, cg->seq);
+               return 0;
+       }
+
+       if (node->cluster_add_time > cg->create_time) {
+               log_group(mg, "match_change %d:%u skip cg %u created %llu "
+                         "cluster add %llu", hd->nodeid, seq, cg->seq,
+                         (unsigned long long)cg->create_time,
+                         (unsigned long long)node->cluster_add_time);
+               return 0;
+       }

The commit gave a brief summary and pointed to this other commit for the
long description of the problems with sorting out events after partitions
and merges:

http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=bcc5fdef8473d99399c624a7bc15423a2af645c1



  reply	other threads:[~2009-10-16 16:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091014145504.9ADCE1201DA@lists.fedorahosted.org>
2009-10-14 17:53 ` [Cluster-devel] Re: gfs2-utils: master - gfs_controld: Remove three unused functions David Teigland
2009-10-16 14:56   ` Steven Whitehouse
2009-10-16 15:59     ` David Teigland
2009-10-16 16:01       ` Steven Whitehouse
2009-10-16 16:33         ` David Teigland [this message]
2009-10-19 10:35           ` Steven Whitehouse
2009-10-19 18:49             ` David Teigland

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=20091016163333.GE23459@redhat.com \
    --to=teigland@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.