Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17447717 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'nfsd-4.3' of git://linux-nfs.org/~bfields/linux

Pull nfsd updates from Bruce Fields:
 "Nothing major, but:

   - Add Jeff Layton as an nfsd co-maintainer: no change to existing
     practice, just an acknowledgement of the status quo.

   - Two patches ("nfsd: ensure that...") for a race overlooked by the
     state locking rewrite, causing a crash noticed by multiple users.

   - Lots of smaller bugfixes all over from Kinglong Mee.

   - From Jeff, some cleanup of server rpc code in preparation for
     possible shift of nfsd threads to workqueues"

* tag 'nfsd-4.3' of git://linux-nfs.org/~bfields/linux: (52 commits)
  nfsd: deal with DELEGRETURN racing with CB_RECALL
  nfsd: return CLID_INUSE for unexpected SETCLIENTID_CONFIRM case
  nfsd: ensure that delegation stateid hash references are only put once
  nfsd: ensure that the ol stateid hash reference is only put once
  net: sunrpc: fix tracepoint Warning: unknown op '->'
  nfsd: allow more than one laundry job to run at a time
  nfsd: don't WARN/backtrace for invalid container deployment.
  fs: fix fs/locks.c kernel-doc warning
  nfsd: Add Jeff Layton as co-maintainer
  NFSD: Return word2 bitmask if setting security label in OPEN/CREATE
  NFSD: Set the attributes used to store the verifier for EXCLUSIVE4_1
  nfsd: SUPPATTR_EXCLCREAT must be encoded before SECURITY_LABEL.
  nfsd: Fix an FS_LAYOUT_TYPES/LAYOUT_TYPES encode bug
  NFSD: Store parent's stat in a separate value
  nfsd: Fix two typos in comments
  lockd: NLM grace period shouldn't block NFSv4 opens
  nfsd: include linux/nfs4.h in export.h
  sunrpc: Switch to using hash list instead single list
  sunrpc/nfsd: Remove redundant code by exports seq_operations functions
  sunrpc: Store cache_detail in seq_file's private directly
  ...
parents 22365979 a457974f
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -138,9 +138,9 @@ Installation
  - Build, install, reboot

    The NFS/RDMA code will be enabled automatically if NFS and RDMA
    are turned on. The NFS/RDMA client and server are configured via the
    SUNRPC_XPRT_RDMA_CLIENT and SUNRPC_XPRT_RDMA_SERVER config options that both
    depend on SUNRPC and INFINIBAND. The default value of both options will be:
    are turned on. The NFS/RDMA client and server are configured via the hidden
    SUNRPC_XPRT_RDMA config option that depends on SUNRPC and INFINIBAND. The
    value of SUNRPC_XPRT_RDMA will be:

     - N if either SUNRPC or INFINIBAND are N, in this case the NFS/RDMA client
       and server will not be built
@@ -238,9 +238,8 @@ NFS/RDMA Setup

  - Start the NFS server

    If the NFS/RDMA server was built as a module
    (CONFIG_SUNRPC_XPRT_RDMA_SERVER=m in kernel config), load the RDMA
    transport module:
    If the NFS/RDMA server was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in
    kernel config), load the RDMA transport module:

    $ modprobe svcrdma

@@ -259,9 +258,8 @@ NFS/RDMA Setup

  - On the client system

    If the NFS/RDMA client was built as a module
    (CONFIG_SUNRPC_XPRT_RDMA_CLIENT=m in kernel config), load the RDMA client
    module:
    If the NFS/RDMA client was built as a module (CONFIG_SUNRPC_XPRT_RDMA=m in
    kernel config), load the RDMA client module:

    $ modprobe xprtrdma.ko

+7 −1
Original line number Diff line number Diff line
@@ -322,6 +322,11 @@ static int lockd_start_svc(struct svc_serv *serv)
	return error;
}

static struct svc_serv_ops lockd_sv_ops = {
	.svo_shutdown		= svc_rpcb_cleanup,
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
};

static struct svc_serv *lockd_create_svc(void)
{
	struct svc_serv *serv;
@@ -350,7 +355,7 @@ static struct svc_serv *lockd_create_svc(void)
		nlm_timeout = LOCKD_DFLT_TIMEO;
	nlmsvc_timeout = nlm_timeout * HZ;

	serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, svc_rpcb_cleanup);
	serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, &lockd_sv_ops);
	if (!serv) {
		printk(KERN_WARNING "lockd_up: create service failed\n");
		return ERR_PTR(-ENOMEM);
@@ -586,6 +591,7 @@ static int lockd_init_net(struct net *net)

	INIT_DELAYED_WORK(&ln->grace_period_end, grace_ender);
	INIT_LIST_HEAD(&ln->lockd_manager.list);
	ln->lockd_manager.block_opens = false;
	spin_lock_init(&ln->nsm_clnt_lock);
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -1568,6 +1568,7 @@ int fcntl_getlease(struct file *filp)
 * 			    desired lease.
 * @dentry:	dentry to check
 * @arg:	type of lease that we're trying to acquire
 * @flags:	current lock flags
 *
 * Check to see if there's an existing open fd on this file that would
 * conflict with the lease we're trying to set.
+5 −1
Original line number Diff line number Diff line
@@ -308,6 +308,10 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, struct n
	return ret;
}

static struct svc_serv_ops nfs_cb_sv_ops = {
	.svo_enqueue_xprt	= svc_xprt_do_enqueue,
};

static struct svc_serv *nfs_callback_create_svc(int minorversion)
{
	struct nfs_callback_data *cb_info = &nfs_callback_info[minorversion];
@@ -333,7 +337,7 @@ static struct svc_serv *nfs_callback_create_svc(int minorversion)
		printk(KERN_WARNING "nfs_callback_create_svc: no kthread, %d users??\n",
			cb_info->users);

	serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, NULL);
	serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, &nfs_cb_sv_ops);
	if (!serv) {
		printk(KERN_ERR "nfs_callback_create_svc: create service failed\n");
		return ERR_PTR(-ENOMEM);
+21 −2
Original line number Diff line number Diff line
@@ -63,14 +63,33 @@ EXPORT_SYMBOL_GPL(locks_end_grace);
 * lock reclaims.
 */
int
locks_in_grace(struct net *net)
__state_in_grace(struct net *net, bool open)
{
	struct list_head *grace_list = net_generic(net, grace_net_id);
	struct lock_manager *lm;

	if (!open)
		return !list_empty(grace_list);

	list_for_each_entry(lm, grace_list, list) {
		if (lm->block_opens)
			return true;
	}
	return false;
}

int locks_in_grace(struct net *net)
{
	return __state_in_grace(net, 0);
}
EXPORT_SYMBOL_GPL(locks_in_grace);

int opens_in_grace(struct net *net)
{
	return __state_in_grace(net, 1);
}
EXPORT_SYMBOL_GPL(opens_in_grace);

static int __net_init
grace_init_net(struct net *net)
{
Loading