[PATCH v4 0/7] nfs-utils: support for lifting grace period early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux