Commit 7537db24 authored by Anna Schumaker's avatar Anna Schumaker
Browse files

NFS: Merge CONFIG_NFS_V4_1 with CONFIG_NFS_V4



Compiling the NFSv4 module without any minorversion support doesn't make
much sense, so this patch sets NFS v4.1 as the default, always enabled
NFS version allowing us to replace all the CONFIG_NFS_V4_1s scattered
throughout the code with CONFIG_NFS_V4.

Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent 4e026935
Loading
Loading
Loading
Loading
+9 −18
Original line number Diff line number Diff line
@@ -78,9 +78,10 @@ config NFS_V4
	tristate "NFS client support for NFS version 4"
	depends on NFS_FS
	select KEYS
	select SUNRPC_BACKCHANNEL
	help
	  This option enables support for version 4 of the NFS protocol
	  (RFC 3530) in the kernel's NFS client.
	  This option enables support for version 4.1 of the NFS protocol
	  (RFC 5661) in the kernel's NFS client.

	  To mount NFS servers using NFSv4, you also need to install user
	  space programs which can be found in the Linux nfs-utils package,
@@ -105,19 +106,9 @@ config NFS_V4_0

	  If unsure, say N.

config NFS_V4_1
	bool "NFS client support for NFSv4.1"
	depends on NFS_V4
	select SUNRPC_BACKCHANNEL
	help
	  This option enables support for minor version 1 of the NFSv4 protocol
	  (RFC 5661) in the kernel's NFS client.

	  If unsure, say N.

config NFS_V4_2
	bool "NFS client support for NFSv4.2"
	depends on NFS_V4_1
	depends on NFS_V4
	help
	  This option enables support for minor version 2 of the NFSv4 protocol
	  in the kernel's NFS client.
@@ -126,22 +117,22 @@ config NFS_V4_2

config PNFS_FILE_LAYOUT
	tristate
	depends on NFS_V4_1
	depends on NFS_V4
	default NFS_V4

config PNFS_BLOCK
	tristate
	depends on NFS_V4_1 && BLK_DEV_DM
	depends on NFS_V4 && BLK_DEV_DM
	default NFS_V4

config PNFS_FLEXFILE_LAYOUT
	tristate
	depends on NFS_V4_1
	depends on NFS_V4
	default NFS_V4

config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN
	string "NFSv4.1 Implementation ID Domain"
	depends on NFS_V4_1
	depends on NFS_V4
	default "kernel.org"
	help
	  This option defines the domain portion of the implementation ID that
@@ -153,7 +144,7 @@ config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN

config NFS_V4_1_MIGRATION
	bool "NFSv4.1 client support for migration"
	depends on NFS_V4_1
	depends on NFS_V4
	default n
	help
	  This option makes the NFS client advertise to NFSv4.1 servers that
+1 −2
Original line number Diff line number Diff line
@@ -27,11 +27,10 @@ CFLAGS_nfs4trace.o += -I$(src)
nfsv4-y := nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o nfs4super.o nfs4file.o \
	  delegation.o nfs4idmap.o callback.o callback_xdr.o callback_proc.o \
	  nfs4namespace.o nfs4getroot.o nfs4client.o nfs4session.o \
	  dns_resolve.o nfs4trace.o
	  dns_resolve.o nfs4trace.o pnfs.o pnfs_dev.o pnfs_nfs.o
nfsv4-$(CONFIG_NFS_USE_LEGACY_DNS) += cache_lib.o
nfsv4-$(CONFIG_SYSCTL)	+= nfs4sysctl.o
nfsv4-$(CONFIG_NFS_V4_0)	+= nfs40client.o nfs40proc.o
nfsv4-$(CONFIG_NFS_V4_1)	+= pnfs.o pnfs_dev.o pnfs_nfs.o
nfsv4-$(CONFIG_NFS_V4_2)	+= nfs42proc.o nfs42xattr.o

obj-$(CONFIG_PNFS_FILE_LAYOUT) += filelayout/
+1 −12
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ nfs4_callback_svc(void *vrqstp)
	return 0;
}

#if defined(CONFIG_NFS_V4_1)
static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt,
		struct svc_serv *serv)
{
@@ -98,12 +97,6 @@ static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt,
		 */
		xprt->bc_serv = serv;
}
#else
static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt,
		struct svc_serv *serv)
{
}
#endif /* CONFIG_NFS_V4_1 */

static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt,
				  struct svc_serv *serv)
@@ -157,7 +150,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
	}

	ret = 0;
	if (!IS_ENABLED(CONFIG_NFS_V4_1) || minorversion == 0)
	if (minorversion == 0)
		ret = nfs4_callback_up_net(serv, net);
	else if (xprt->ops->bc_setup)
		set_bc_enabled(serv);
@@ -198,10 +191,6 @@ static struct svc_serv *nfs_callback_create_svc(int minorversion)
			cb_info->users);

	threadfn = nfs4_callback_svc;
#if !defined(CONFIG_NFS_V4_1)
	if (minorversion)
		return ERR_PTR(-ENOTSUPP);
#endif
	serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE,
			  threadfn);
	if (!serv) {
+0 −3
Original line number Diff line number Diff line
@@ -65,8 +65,6 @@ struct cb_recallargs {
	uint32_t truncate;
};

#if defined(CONFIG_NFS_V4_1)

struct referring_call {
	uint32_t			rc_sequenceid;
	uint32_t			rc_slotid;
@@ -168,7 +166,6 @@ struct cb_notify_lock_args {

extern __be32 nfs4_callback_notify_lock(void *argp, void *resp,
					 struct cb_process_state *cps);
#endif /* CONFIG_NFS_V4_1 */
#ifdef CONFIG_NFS_V4_2
struct cb_offloadargs {
	struct nfs_fh		coa_fh;
+0 −3
Original line number Diff line number Diff line
@@ -126,8 +126,6 @@ __be32 nfs4_callback_recall(void *argp, void *resp,
	return res;
}

#if defined(CONFIG_NFS_V4_1)

/*
 * Lookup a layout inode by stateid
 *
@@ -698,7 +696,6 @@ __be32 nfs4_callback_notify_lock(void *argp, void *resp,

	return htonl(NFS4_OK);
}
#endif /* CONFIG_NFS_V4_1 */
#ifdef CONFIG_NFS_V4_2
static void nfs4_copy_cb_args(struct nfs4_copy_state *cp_state,
				struct cb_offloadargs *args)
Loading