📄 nfs_fs.h
字号:
* linux/fs/nfs/inode.c */extern int nfs_sync_mapping(struct address_space *mapping);extern void nfs_zap_mapping(struct inode *inode, struct address_space *mapping);extern void nfs_zap_caches(struct inode *);extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *);extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);extern int nfs_permission(struct inode *, int, struct nameidata *);extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *);extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);extern void nfs_access_zap_cache(struct inode *inode);extern int nfs_open(struct inode *, struct file *);extern int nfs_release(struct inode *, struct file *);extern int nfs_attribute_timeout(struct inode *inode);extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping);extern int nfs_setattr(struct dentry *, struct iattr *);extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);extern void nfs_begin_attr_update(struct inode *);extern void nfs_end_attr_update(struct inode *);extern void nfs_begin_data_update(struct inode *);extern void nfs_end_data_update(struct inode *);extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);extern void put_nfs_open_context(struct nfs_open_context *ctx);extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode);/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */extern __be32 root_nfs_parse_addr(char *name); /*__init*/static inline void nfs_fattr_init(struct nfs_fattr *fattr){ fattr->valid = 0; fattr->time_start = jiffies;}/* * linux/fs/nfs/file.c */extern struct inode_operations nfs_file_inode_operations;#ifdef CONFIG_NFS_V3extern struct inode_operations nfs3_file_inode_operations;#endif /* CONFIG_NFS_V3 */extern const struct file_operations nfs_file_operations;extern const struct address_space_operations nfs_file_aops;static inline struct rpc_cred *nfs_file_cred(struct file *file){ if (file != NULL) { struct nfs_open_context *ctx; ctx = (struct nfs_open_context*)file->private_data; return ctx->cred; } return NULL;}/* * linux/fs/nfs/xattr.c */#ifdef CONFIG_NFS_V3_ACLextern ssize_t nfs3_listxattr(struct dentry *, char *, size_t);extern ssize_t nfs3_getxattr(struct dentry *, const char *, void *, size_t);extern int nfs3_setxattr(struct dentry *, const char *, const void *, size_t, int);extern int nfs3_removexattr (struct dentry *, const char *name);#else# define nfs3_listxattr NULL# define nfs3_getxattr NULL# define nfs3_setxattr NULL# define nfs3_removexattr NULL#endif/* * linux/fs/nfs/direct.c */extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, unsigned long);extern ssize_t nfs_file_direct_read(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos);/* * linux/fs/nfs/dir.c */extern struct inode_operations nfs_dir_inode_operations;#ifdef CONFIG_NFS_V3extern struct inode_operations nfs3_dir_inode_operations;#endif /* CONFIG_NFS_V3 */extern const struct file_operations nfs_dir_operations;extern struct dentry_operations nfs_dentry_operations;extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr);/* * linux/fs/nfs/symlink.c */extern struct inode_operations nfs_symlink_inode_operations;/* * linux/fs/nfs/sysctl.c */#ifdef CONFIG_SYSCTLextern int nfs_register_sysctl(void);extern void nfs_unregister_sysctl(void);#else#define nfs_register_sysctl() 0#define nfs_unregister_sysctl() do { } while(0)#endif/* * linux/fs/nfs/namespace.c */extern struct list_head nfs_automount_list;extern struct inode_operations nfs_mountpoint_inode_operations;extern struct inode_operations nfs_referral_inode_operations;extern int nfs_mountpoint_expiry_timeout;extern void nfs_release_automount_timer(void);/* * linux/fs/nfs/unlink.c */extern int nfs_async_unlink(struct dentry *);extern void nfs_complete_unlink(struct dentry *);/* * linux/fs/nfs/write.c */extern int nfs_writepage(struct page *page, struct writeback_control *wbc);extern int nfs_writepages(struct address_space *, struct writeback_control *);extern int nfs_flush_incompatible(struct file *file, struct page *page);extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);extern void nfs_writedata_release(void *);extern int nfs_set_page_dirty(struct page *);/* * Try to write back everything synchronously (but check the * return value!) */extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_control *, int);extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);extern int nfs_wb_all(struct inode *inode);extern int nfs_wb_page(struct inode *inode, struct page* page);extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how);#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)extern int nfs_commit_inode(struct inode *, int);extern struct nfs_write_data *nfs_commit_alloc(void);extern void nfs_commit_free(struct nfs_write_data *wdata);extern void nfs_commit_release(void *wdata);#elsestatic inline intnfs_commit_inode(struct inode *inode, int how){ return 0;}#endifstatic inline intnfs_have_writebacks(struct inode *inode){ return NFS_I(inode)->npages != 0;}/* * Allocate nfs_write_data structures */extern struct nfs_write_data *nfs_writedata_alloc(size_t len);/* * linux/fs/nfs/read.c */extern int nfs_readpage(struct file *, struct page *);extern int nfs_readpages(struct file *, struct address_space *, struct list_head *, unsigned);extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *);extern void nfs_readdata_release(void *data);/* * Allocate nfs_read_data structures */extern struct nfs_read_data *nfs_readdata_alloc(size_t len);/* * linux/fs/nfs3proc.c */#ifdef CONFIG_NFS_V3_ACLextern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type);extern int nfs3_proc_setacl(struct inode *inode, int type, struct posix_acl *acl);extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, mode_t mode);extern void nfs3_forget_cached_acls(struct inode *inode);#elsestatic inline int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, mode_t mode){ return 0;}static inline void nfs3_forget_cached_acls(struct inode *inode){}#endif /* CONFIG_NFS_V3_ACL *//* * linux/fs/mount_clnt.c * (Used only by nfsroot module) */extern int nfsroot_mount(struct sockaddr_in *, char *, struct nfs_fh *, int, int);/* * inline functions */static inline loff_tnfs_size_to_loff_t(__u64 size){ loff_t maxsz = (((loff_t) ULONG_MAX) << PAGE_CACHE_SHIFT) + PAGE_CACHE_SIZE - 1; if (size > maxsz) return maxsz; return (loff_t) size;}static inline ino_tnfs_fileid_to_ino_t(u64 fileid){ ino_t ino = (ino_t) fileid; if (sizeof(ino_t) < sizeof(u64)) ino ^= fileid >> (sizeof(u64)-sizeof(ino_t)) * 8; return ino;}/* NFS root */extern void * nfs_root_data(void);#define nfs_wait_event(clnt, wq, condition) \({ \ int __retval = 0; \ if (clnt->cl_intr) { \ sigset_t oldmask; \ rpc_clnt_sigmask(clnt, &oldmask); \ __retval = wait_event_interruptible(wq, condition); \ rpc_clnt_sigunmask(clnt, &oldmask); \ } else \ wait_event(wq, condition); \ __retval; \})#define NFS_JUKEBOX_RETRY_TIME (5 * HZ)#endif /* __KERNEL__ *//* * NFS debug flags */#define NFSDBG_VFS 0x0001#define NFSDBG_DIRCACHE 0x0002#define NFSDBG_LOOKUPCACHE 0x0004#define NFSDBG_PAGECACHE 0x0008#define NFSDBG_PROC 0x0010#define NFSDBG_XDR 0x0020#define NFSDBG_FILE 0x0040#define NFSDBG_ROOT 0x0080#define NFSDBG_CALLBACK 0x0100#define NFSDBG_CLIENT 0x0200#define NFSDBG_ALL 0xFFFF#ifdef __KERNEL__# undef ifdebug# ifdef NFS_DEBUG# define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac))# else# define ifdebug(fac) if (0)# endif#endif /* __KERNEL */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -