nfsd: handle legacy client tracking records sent by nfsdcld
authorScott Mayhew <smayhew@redhat.com>
Tue, 26 Mar 2019 22:06:30 +0000 (18:06 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 24 Apr 2019 13:46:34 +0000 (09:46 -0400)
commit8a9f4f41248a4dc00a9f0831a50f8b7a2fd86bfc
treedd390e0d6c31e64a32c62cb4c45e0a539f268306
parent869216075b63c7a4030ee193c079cb5a69a918cb
nfsd: handle legacy client tracking records sent by nfsdcld

The new nfsdcld will do a one-time "upgrade" where it searches for
records from nfsdcltrack and the legacy tracking during startup.
Legacy records will be prefixed with the string "hash:", which we need
to strip off before adding to the reclaim_str_hashtbl.  When legacy
records are encountered, set the new cn_has_legacy flag in the cld_net.
When this flag is set, if the search for a reclaim record based on the
client name string fails, then do a second search based on the hash of
the name string.

Note that if there are legacy records then the grace period will not
be lifted early via the tracking of RECLAIM_COMPLETEs.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4recover.c