mirror of
https://github.com/torvalds/linux.git
synced 2025-04-11 04:53:02 +00:00

The legacy rpc.nfsd tool will set the nlm_grace_period if the NFSv4 grace period is set. nfsdctl is missing this functionality, so add a new netlink control interface for lockd that it can use. For now, it only allows setting the grace period, and the tcp and udp listener ports. lockd currently uses module parameters and sysctls for configuration, so all of its settings are global. With this change, lockd now tracks these values on a per-net-ns basis. It will only fall back to using the global values if any of them are 0. Finally, as a backward compatibility measure, if updating the nlm settings in the init_net namespace, also update the legacy global values to match. Link: https://issues.redhat.com/browse/RHEL-71698 Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
26 lines
469 B
C
26 lines
469 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __LOCKD_NETNS_H__
|
|
#define __LOCKD_NETNS_H__
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/filelock.h>
|
|
#include <net/netns/generic.h>
|
|
|
|
struct lockd_net {
|
|
unsigned int nlmsvc_users;
|
|
unsigned long next_gc;
|
|
unsigned long nrhosts;
|
|
u32 gracetime;
|
|
u16 tcp_port;
|
|
u16 udp_port;
|
|
|
|
struct delayed_work grace_period_end;
|
|
struct lock_manager lockd_manager;
|
|
|
|
struct list_head nsm_handles;
|
|
};
|
|
|
|
extern unsigned int lockd_net_id;
|
|
|
|
#endif
|