linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@primarydata.com>
To: steved@redhat.com
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org
Subject: [PATCH v4 0/7] nfs-utils: support for lifting grace period early
Date: Mon, 15 Sep 2014 10:00:58 -0400	[thread overview]
Message-ID: <1410789665-19745-1-git-send-email-jlayton@primarydata.com> (raw)

v4:
- replace "reclaim_complete" timestamp column with "has_session" boolean
- change to use NFSDCLTRACK_CLIENT_HAS_SESSION environment variable
- only set timestamp on "has_session" clients during "create" op

v3:
- account for change to NFSDCLTRACK_RECLAIM_COMPLETE env var

This is v4 of the patchset to allow the lifting of the grace period
early. The changes in this set are a bit more substantial than the kernel
piece.

Last week Bruce noted that we have an existing bug in how nfsdcltrack
works with v4.1+ clients. It updates the timestamp for v4.1+ clients
on a "check" operation, which can lead to the server handing out
conflicting locks if the v4.1+ client never sends a RECLAIM_COMPLETE.

To fix this, the program must be able to distingush between v4.0 and
v4.1+ clients during both the create and check operations. This set adds
the ability for it to do so by looking for the correct environment
variables as passed by the kernel.

Historically, nfsdcltrack has not distinguished between v4.0 and v4.1+
clients at alli and has basically applied the v4.0 rules to all clients.
On a DB upgrade, the kernel assumes that all clients are v4.0. Once
the kernel sends a "create" upcall that indicates that it's a v4.1
client it will update the DB accordingly.

Thus, fixing the bug that Bruce spotted requires both an updated
nfs-utils and kernel. With only one or the other, things should
basically work as they have so far (with all clients being treated
as v4.0 clients).

Jeff Layton (7):
  sm-notify: inform the kernel if there were no hosts to notify
  nfsdcltrack: update comments in sqlite.c
  nfsdcltrack: rename CLD_* constants with CLTRACK_* prefixes
  nfsdcltrack: overhaul database initializtion
  nfsdcltrack: update schema to v2
  nfsdcltrack: grab the NFSDCLTRACK_CLIENT_HAS_SESSION env var if it's
    present
  nfsdcltrack: fetch NFSDCLTRACK_GRACE_START out of environment

 utils/nfsdcltrack/nfsdcltrack.c | 103 ++++++++++-
 utils/nfsdcltrack/sqlite.c      | 388 ++++++++++++++++++++++++++++++----------
 utils/nfsdcltrack/sqlite.h      |   8 +-
 utils/statd/sm-notify.c         |  25 +++
 4 files changed, 421 insertions(+), 103 deletions(-)

-- 
1.9.3


             reply	other threads:[~2014-09-15 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 14:00 Jeff Layton [this message]
2014-09-15 14:00 ` [PATCH v4 1/7] sm-notify: inform the kernel if there were no hosts to notify Jeff Layton
2014-09-15 14:01 ` [PATCH v4 2/7] nfsdcltrack: update comments in sqlite.c Jeff Layton
2014-09-15 14:01 ` [PATCH v4 3/7] nfsdcltrack: rename CLD_* constants with CLTRACK_* prefixes Jeff Layton
2014-09-19 13:26   ` Steve Dickson
2014-09-15 14:01 ` [PATCH v4 4/7] nfsdcltrack: overhaul database initializtion Jeff Layton
2014-09-15 14:01 ` [PATCH v4 5/7] nfsdcltrack: update schema to v2 Jeff Layton
2014-09-15 14:01 ` [PATCH v4 6/7] nfsdcltrack: grab the NFSDCLTRACK_CLIENT_HAS_SESSION env var if it's present Jeff Layton
2014-09-15 14:01 ` [PATCH v4 7/7] nfsdcltrack: fetch NFSDCLTRACK_GRACE_START out of environment Jeff Layton

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=1410789665-19745-1-git-send-email-jlayton@primarydata.com \
    --to=jlayton@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@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).