linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Scott Mayhew <smayhew@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [RFC nfs-utils PATCH] nfsdcltrack: cluster mode
Date: Tue, 14 Mar 2017 17:03:44 -0400	[thread overview]
Message-ID: <20170314210344.GA5690@fieldses.org> (raw)
In-Reply-To: <20170314141157.tjyhyostquyazpyl@tonberry.usersys.redhat.com>

On Tue, Mar 14, 2017 at 10:11:57AM -0400, Scott Mayhew wrote:
> On Mon, 13 Mar 2017, J. Bruce Fields wrote:
> > On Fri, Mar 10, 2017 at 04:46:12PM -0500, Scott Mayhew wrote:
> > > 3. During nfsdcltrack's startup, we stat the etab file.  If the inode
> > >    number is different than what we have in the db, then we know that
> > >    the exportfs program has modified the file.  We read in the exported
> > >    path names and compare them to what we have stored in the exports
> > >    table.  If any new exports has been added, we merge the client
> > >    records from db's on those exports into the clients table of the
> > >    local db.  Then we update the exports table in the local db.
> > 
> > How does the merging work?  What happens when some of the clients from
> > an export's .nfsdcltrack/ database are the same as known clients?
> 
> The known clients are left as-is.  That's what the 'OR IGNORE' in the
> INSERT statement in the merge function is for (the id is the primary
> key of the clients table -- the 'OR IGNORE' tells sqlite what to do in
> the event that it were to violate that constraint).

I wonder about the other fields--the merged entry should probably have
the latest of the times on the two entries, and it should probably be a
sign of a problem if has_session doesn't agree, I think?

--b.

  parent reply	other threads:[~2017-03-14 21:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 21:46 [RFC nfs-utils PATCH] nfsdcltrack: cluster mode Scott Mayhew
2017-03-13 21:20 ` J. Bruce Fields
2017-03-14 14:11   ` Scott Mayhew
2017-03-14 14:20     ` J. Bruce Fields
2017-03-14 21:03     ` J. Bruce Fields [this message]
2017-03-15 12:30       ` Scott Mayhew

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=20170314210344.GA5690@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=smayhew@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).