nfs_fs.h
来自「此工具是arm-linux-GCC交叉编译工具(cross-3.4.4)」· C头文件 代码 · 共 586 行 · 第 1/2 页
H
586 行
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 void nfs_revalidate_mapping(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 *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred);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 void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx);extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, int mode);extern void nfs_file_clear_open_context(struct file *filp);/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */extern u32 root_nfs_parse_addr(char *name); /*__init*//* * 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 struct file_operations nfs_file_operations;extern 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, char __user *buf, size_t count, loff_t pos);extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, 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 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/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 void nfs_writeback_done(struct rpc_task *task);#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)extern void nfs_commit_done(struct rpc_task *);#endif/* * Try to write back everything synchronously (but check the * return value!) */extern int nfs_sync_inode(struct inode *, unsigned long, unsigned int, int);#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)extern int nfs_commit_inode(struct inode *, int);#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;}static inline intnfs_wb_all(struct inode *inode){ int error = nfs_sync_inode(inode, 0, 0, FLUSH_WAIT); return (error < 0) ? error : 0;}/* * Write back all requests on one page - we do this before reading it. */static inline int nfs_wb_page_priority(struct inode *inode, struct page* page, int how){ int error = nfs_sync_inode(inode, page->index, 1, how | FLUSH_WAIT | FLUSH_STABLE); return (error < 0) ? error : 0;}static inline int nfs_wb_page(struct inode *inode, struct page* page){ return nfs_wb_page_priority(inode, page, 0);}/* * Allocate and free nfs_write_data structures */extern mempool_t *nfs_wdata_mempool;static inline struct nfs_write_data *nfs_writedata_alloc(void){ struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); if (p) { memset(p, 0, sizeof(*p)); INIT_LIST_HEAD(&p->pages); } return p;}static inline void nfs_writedata_free(struct nfs_write_data *p){ mempool_free(p, nfs_wdata_mempool);}/* * 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 void nfs_readpage_result(struct rpc_task *);/* * Allocate and free nfs_read_data structures */extern mempool_t *nfs_rdata_mempool;static inline struct nfs_read_data *nfs_readdata_alloc(void){ struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); if (p) memset(p, 0, sizeof(*p)); return p;}static inline void nfs_readdata_free(struct nfs_read_data *p){ mempool_free(p, nfs_rdata_mempool);}extern void nfs_readdata_release(struct rpc_task *task);/* * 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_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 + =
减小字号Ctrl + -
显示快捷键?