Commit 7c563cc9 authored by Suresh Jayaraman's avatar Suresh Jayaraman Committed by Trond Myklebust
Browse files

nfs: show "local_lock" mount option in /proc/mounts



Display the status of 'local_lock' mount option in /proc/mounts.


Signed-off-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent ef84303e
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -632,6 +632,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
	const struct proc_nfs_info *nfs_infop;
	const struct proc_nfs_info *nfs_infop;
	struct nfs_client *clp = nfss->nfs_client;
	struct nfs_client *clp = nfss->nfs_client;
	u32 version = clp->rpc_ops->version;
	u32 version = clp->rpc_ops->version;
	int local_flock, local_fcntl;


	seq_printf(m, ",vers=%u", version);
	seq_printf(m, ",vers=%u", version);
	seq_printf(m, ",rsize=%u", nfss->rsize);
	seq_printf(m, ",rsize=%u", nfss->rsize);
@@ -680,6 +681,18 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
		else
		else
			seq_printf(m, ",lookupcache=pos");
			seq_printf(m, ",lookupcache=pos");
	}
	}

	local_flock = nfss->flags & NFS_MOUNT_LOCAL_FLOCK;
	local_fcntl = nfss->flags & NFS_MOUNT_LOCAL_FCNTL;

	if (!local_flock && !local_fcntl)
		seq_printf(m, ",local_lock=none");
	else if (local_flock && local_fcntl)
		seq_printf(m, ",local_lock=all");
	else if (local_flock)
		seq_printf(m, ",local_lock=flock");
	else
		seq_printf(m, ",local_lock=posix");
}
}


/*
/*