]> git.ipfire.org Git - people/ms/linux.git/commit - fs/nfsd/netns.h
nfsd: set the server_scope during service startup
authorScott Mayhew <smayhew@redhat.com>
Wed, 19 Feb 2020 20:52:15 +0000 (15:52 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Mar 2020 16:04:30 +0000 (12:04 -0400)
commit7627d7dc79a8edd4b8f946a66002ea4205203112
treeada1890d3a593920ca589e8f5c5fd6836a66fc60
parentfb33c6510d5595144d585aa194d377cf74d31911
nfsd: set the server_scope during service startup

Currently, nfsd4_encode_exchange_id() encodes the utsname nodename
string in the server_scope field.  In a multi-host container
environemnt, if an nfsd container is restarted on a different host than
it was originally running on, clients will see a server_scope mismatch
and will not attempt to reclaim opens.

Instead, set the server_scope while we're in a process context during
service startup, so we get the utsname nodename of the current process
and store that in nfsd_net.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
[bfields: fix up major_id too]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/netns.h
fs/nfsd/nfs4xdr.c
fs/nfsd/nfssvc.c