9 #define NFS_MS_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_SYNCHRONOUS)
19 #define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1)
24 static inline int nfs4_has_session(
const struct nfs_client *clp)
26 #ifdef CONFIG_NFS_V4_1
33 static inline int nfs4_has_persistent_session(
const struct nfs_client *clp)
35 #ifdef CONFIG_NFS_V4_1
36 if (nfs4_has_session(clp))
42 static inline void nfs_attr_check_mountpoint(
struct super_block *parent,
struct nfs_fattr *fattr)
44 if (!nfs_fsid_equal(&NFS_SB(parent)->
fsid, &fattr->
fsid))
48 static inline int nfs_attr_use_mounted_on_fileid(
struct nfs_fattr *fattr)
75 #define NFS_MAX_SECFLAVORS (12)
80 #define NFS_UNSPEC_PORT (-1)
86 #define NFS_MAX_READDIR_PAGES 8
173 const struct rpc_timeout *,
const char *,
206 int ds_addrlen,
int ds_proto,
207 unsigned int ds_timeo,
208 unsigned int ds_retrans);
209 #ifdef CONFIG_PROC_FS
210 extern int __init nfs_fs_proc_init(
void);
211 extern void nfs_fs_proc_exit(
void);
213 static inline int nfs_fs_proc_init(
void)
217 static inline void nfs_fs_proc_exit(
void)
222 #ifdef CONFIG_NFS_V4_1
223 int nfs_sockaddr_match_ipaddr(
const struct sockaddr *,
const struct sockaddr *);
227 #if IS_ENABLED(CONFIG_NFS_V3)
265 #if IS_ENABLED(CONFIG_NFS_V4)
269 #ifdef CONFIG_NFS_V4_1
270 extern const u32 nfs41_maxread_overhead;
271 extern const u32 nfs41_maxwrite_overhead;
275 #if IS_ENABLED(CONFIG_NFS_V4)
284 const struct rpc_timeout *timeparms,
285 const char *
ip_addr, rpc_authflavor_t authflavour);
306 size_t,
unsigned int);
313 size_t,
unsigned int);
331 #if IS_ENABLED(CONFIG_NFS_V4)
357 #define NFS_PATH_CANONICAL 1
369 #if IS_ENABLED(CONFIG_NFS_V4)
455 #ifdef CONFIG_MIGRATION
459 #define nfs_migrate_page NULL
465 static inline void nfs_inode_dio_wait(
struct inode *
inode)
474 const struct rpc_timeout *timeparms,
476 rpc_authflavor_t authflavour);
491 struct rpc_cred *
cred);
494 struct rpc_cred *
cred);
510 unsigned long nfs_block_bits(
unsigned long bsize,
unsigned char *nrbitsp)
513 if ((bsize & (bsize - 1)) || nrbitsp) {
514 unsigned char nrbits;
516 for (nrbits = 31; nrbits && !(bsize & (1 << nrbits)); nrbits--)
529 static inline blkcnt_t nfs_calc_block_size(
u64 tsize)
539 unsigned long nfs_block_size(
unsigned long bsize,
unsigned char *nrbitsp)
546 return nfs_block_bits(bsize, nrbitsp);
564 unsigned int nfs_page_length(
struct page *
page)
566 loff_t i_size = i_size_read(page_file_mapping(page)->
host);
569 pgoff_t page_index = page_file_index(page);
571 if (page_index < end_index)
573 if (page_index == end_index)
585 return (mode >> 12) & 15;
593 unsigned int nfs_page_array_len(
unsigned int base,
size_t len)
595 return ((
unsigned long)len + (
unsigned long)base +