mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	NFS: Move mount parameterisation bits into their own file
Split various bits relating to mount parameterisation out from fs/nfs/super.c into their own file to form the basis of filesystem context handling for NFS. No other changes are made to the code beyond removing 'static' qualifiers. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
		
							parent
							
								
									adf2314fe6
								
							
						
					
					
						commit
						9954bf92c0
					
				
					 4 changed files with 1445 additions and 1412 deletions
				
			
		| 
						 | 
				
			
			@ -9,7 +9,7 @@ CFLAGS_nfstrace.o += -I$(src)
 | 
			
		|||
nfs-y 			:= client.o dir.o file.o getroot.o inode.o super.o \
 | 
			
		||||
			   io.o direct.o pagelist.o read.o symlink.o unlink.o \
 | 
			
		||||
			   write.o namespace.o mount_clnt.o nfstrace.o \
 | 
			
		||||
			   export.o sysfs.o
 | 
			
		||||
			   export.o sysfs.o fs_context.o
 | 
			
		||||
nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o
 | 
			
		||||
nfs-$(CONFIG_SYSCTL)	+= sysctl.o
 | 
			
		||||
nfs-$(CONFIG_NFS_FSCACHE) += fscache.o fscache-index.o
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1414
									
								
								fs/nfs/fs_context.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1414
									
								
								fs/nfs/fs_context.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
#include <linux/mount.h>
 | 
			
		||||
#include <linux/security.h>
 | 
			
		||||
#include <linux/crc32.h>
 | 
			
		||||
#include <linux/sunrpc/addr.h>
 | 
			
		||||
#include <linux/nfs_page.h>
 | 
			
		||||
#include <linux/wait_bit.h>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -224,6 +225,22 @@ extern const struct svc_version nfs4_callback_version1;
 | 
			
		|||
extern const struct svc_version nfs4_callback_version4;
 | 
			
		||||
 | 
			
		||||
struct nfs_pageio_descriptor;
 | 
			
		||||
 | 
			
		||||
/* mount.c */
 | 
			
		||||
#define NFS_TEXT_DATA		1
 | 
			
		||||
 | 
			
		||||
extern struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void);
 | 
			
		||||
extern void nfs_free_parsed_mount_data(struct nfs_parsed_mount_data *data);
 | 
			
		||||
extern int nfs_parse_mount_options(char *raw, struct nfs_parsed_mount_data *mnt);
 | 
			
		||||
extern int nfs_validate_mount_data(struct file_system_type *fs_type,
 | 
			
		||||
				   void *options,
 | 
			
		||||
				   struct nfs_parsed_mount_data *args,
 | 
			
		||||
				   struct nfs_fh *mntfh,
 | 
			
		||||
				   const char *dev_name);
 | 
			
		||||
extern int nfs_validate_text_mount_data(void *options,
 | 
			
		||||
					struct nfs_parsed_mount_data *args,
 | 
			
		||||
					const char *dev_name);
 | 
			
		||||
 | 
			
		||||
/* pagelist.c */
 | 
			
		||||
extern int __init nfs_init_nfspagecache(void);
 | 
			
		||||
extern void nfs_destroy_nfspagecache(void);
 | 
			
		||||
| 
						 | 
				
			
			@ -765,3 +782,16 @@ static inline bool nfs_error_is_fatal_on_server(int err)
 | 
			
		|||
	}
 | 
			
		||||
	return nfs_error_is_fatal(err);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Select between a default port value and a user-specified port value.
 | 
			
		||||
 * If a zero value is set, then autobind will be used.
 | 
			
		||||
 */
 | 
			
		||||
static inline void nfs_set_port(struct sockaddr *sap, int *port,
 | 
			
		||||
				const unsigned short default_port)
 | 
			
		||||
{
 | 
			
		||||
	if (*port == NFS_UNSPEC_PORT)
 | 
			
		||||
		*port = default_port;
 | 
			
		||||
 | 
			
		||||
	rpc_set_port(sap, *port);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1411
									
								
								fs/nfs/super.c
									
									
									
									
									
								
							
							
						
						
									
										1411
									
								
								fs/nfs/super.c
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
		Reference in a new issue