⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 internal.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
extern struct afs_call *afs_alloc_flat_call(const struct afs_call_type *,					    size_t, size_t);extern void afs_flat_call_destructor(struct afs_call *);extern void afs_transfer_reply(struct afs_call *, struct sk_buff *);extern void afs_send_empty_reply(struct afs_call *);extern void afs_send_simple_reply(struct afs_call *, const void *, size_t);extern int afs_extract_data(struct afs_call *, struct sk_buff *, bool, void *,			    size_t);/* * security.c */extern void afs_clear_permits(struct afs_vnode *);extern void afs_cache_permit(struct afs_vnode *, struct key *, long);extern void afs_zap_permits(struct rcu_head *);extern struct key *afs_request_key(struct afs_cell *);extern int afs_permission(struct inode *, int, struct nameidata *);/* * server.c */extern spinlock_t afs_server_peer_lock;#define afs_get_server(S)					\do {								\	_debug("GET SERVER %d", atomic_read(&(S)->usage));	\	atomic_inc(&(S)->usage);				\} while(0)extern struct afs_server *afs_lookup_server(struct afs_cell *,					    const struct in_addr *);extern struct afs_server *afs_find_server(const struct in_addr *);extern void afs_put_server(struct afs_server *);extern void __exit afs_purge_servers(void);/* * super.c */extern int afs_fs_init(void);extern void afs_fs_exit(void);/* * use-rtnetlink.c */extern int afs_get_ipv4_interfaces(struct afs_interface *, size_t, bool);extern int afs_get_MAC_address(u8 *, size_t);/* * vlclient.c */#ifdef AFS_CACHING_SUPPORTextern struct cachefs_index_def afs_vlocation_cache_index_def;#endifextern int afs_vl_get_entry_by_name(struct in_addr *, struct key *,				    const char *, struct afs_cache_vlocation *,				    const struct afs_wait_mode *);extern int afs_vl_get_entry_by_id(struct in_addr *, struct key *,				  afs_volid_t, afs_voltype_t,				  struct afs_cache_vlocation *,				  const struct afs_wait_mode *);/* * vlocation.c */#define afs_get_vlocation(V) do { atomic_inc(&(V)->usage); } while(0)extern int __init afs_vlocation_update_init(void);extern struct afs_vlocation *afs_vlocation_lookup(struct afs_cell *,						  struct key *,						  const char *, size_t);extern void afs_put_vlocation(struct afs_vlocation *);extern void afs_vlocation_purge(void);/* * vnode.c */#ifdef AFS_CACHING_SUPPORTextern struct cachefs_index_def afs_vnode_cache_index_def;#endifextern struct afs_timer_ops afs_vnode_cb_timed_out_ops;static inline struct afs_vnode *AFS_FS_I(struct inode *inode){	return container_of(inode, struct afs_vnode, vfs_inode);}static inline struct inode *AFS_VNODE_TO_I(struct afs_vnode *vnode){	return &vnode->vfs_inode;}extern void afs_vnode_finalise_status_update(struct afs_vnode *,					     struct afs_server *);extern int afs_vnode_fetch_status(struct afs_vnode *, struct afs_vnode *,				  struct key *);extern int afs_vnode_fetch_data(struct afs_vnode *, struct key *,				off_t, size_t, struct page *);extern int afs_vnode_create(struct afs_vnode *, struct key *, const char *,			    umode_t, struct afs_fid *, struct afs_file_status *,			    struct afs_callback *, struct afs_server **);extern int afs_vnode_remove(struct afs_vnode *, struct key *, const char *,			    bool);extern int afs_vnode_link(struct afs_vnode *, struct afs_vnode *, struct key *,			  const char *);extern int afs_vnode_symlink(struct afs_vnode *, struct key *, const char *,			     const char *, struct afs_fid *,			     struct afs_file_status *, struct afs_server **);extern int afs_vnode_rename(struct afs_vnode *, struct afs_vnode *,			    struct key *, const char *, const char *);extern int afs_vnode_store_data(struct afs_writeback *, pgoff_t, pgoff_t,				unsigned, unsigned);extern int afs_vnode_setattr(struct afs_vnode *, struct key *, struct iattr *);extern int afs_vnode_get_volume_status(struct afs_vnode *, struct key *,				       struct afs_volume_status *);extern int afs_vnode_set_lock(struct afs_vnode *, struct key *,			      afs_lock_type_t);extern int afs_vnode_extend_lock(struct afs_vnode *, struct key *);extern int afs_vnode_release_lock(struct afs_vnode *, struct key *);/* * volume.c */#ifdef AFS_CACHING_SUPPORTextern struct cachefs_index_def afs_volume_cache_index_def;#endif#define afs_get_volume(V) do { atomic_inc(&(V)->usage); } while(0)extern void afs_put_volume(struct afs_volume *);extern struct afs_volume *afs_volume_lookup(struct afs_mount_params *);extern struct afs_server *afs_volume_pick_fileserver(struct afs_vnode *);extern int afs_volume_release_fileserver(struct afs_vnode *,					 struct afs_server *, int);/* * write.c */extern int afs_set_page_dirty(struct page *);extern void afs_put_writeback(struct afs_writeback *);extern int afs_prepare_write(struct file *, struct page *, unsigned, unsigned);extern int afs_commit_write(struct file *, struct page *, unsigned, unsigned);extern int afs_writepage(struct page *, struct writeback_control *);extern int afs_writepages(struct address_space *, struct writeback_control *);extern int afs_write_inode(struct inode *, int);extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);extern ssize_t afs_file_write(struct kiocb *, const struct iovec *,			      unsigned long, loff_t);extern int afs_writeback_all(struct afs_vnode *);extern int afs_fsync(struct file *, struct dentry *, int);/*****************************************************************************//* * debug tracing */extern unsigned afs_debug;#define dbgprintk(FMT,...) \	printk("[%x%-6.6s] "FMT"\n", smp_processor_id(), current->comm ,##__VA_ARGS__)/* make sure we maintain the format strings, even when debugging is disabled */static inline __attribute__((format(printf,1,2)))void _dbprintk(const char *fmt, ...){}#define kenter(FMT,...)	dbgprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)#define kleave(FMT,...)	dbgprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)#define kdebug(FMT,...)	dbgprintk("    "FMT ,##__VA_ARGS__)#if defined(__KDEBUG)#define _enter(FMT,...)	kenter(FMT,##__VA_ARGS__)#define _leave(FMT,...)	kleave(FMT,##__VA_ARGS__)#define _debug(FMT,...)	kdebug(FMT,##__VA_ARGS__)#elif defined(CONFIG_AFS_DEBUG)#define AFS_DEBUG_KENTER	0x01#define AFS_DEBUG_KLEAVE	0x02#define AFS_DEBUG_KDEBUG	0x04#define _enter(FMT,...)					\do {							\	if (unlikely(afs_debug & AFS_DEBUG_KENTER))	\		kenter(FMT,##__VA_ARGS__);		\} while (0)#define _leave(FMT,...)					\do {							\	if (unlikely(afs_debug & AFS_DEBUG_KLEAVE))	\		kleave(FMT,##__VA_ARGS__);		\} while (0)#define _debug(FMT,...)					\do {							\	if (unlikely(afs_debug & AFS_DEBUG_KDEBUG))	\		kdebug(FMT,##__VA_ARGS__);		\} while (0)#else#define _enter(FMT,...)	_dbprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)#define _leave(FMT,...)	_dbprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)#define _debug(FMT,...)	_dbprintk("    "FMT ,##__VA_ARGS__)#endif/* * debug assertion checking */#if 1 // defined(__KDEBUGALL)#define ASSERT(X)						\do {								\	if (unlikely(!(X))) {					\		printk(KERN_ERR "\n");				\		printk(KERN_ERR "AFS: Assertion failed\n");	\		BUG();						\	}							\} while(0)#define ASSERTCMP(X, OP, Y)						\do {									\	if (unlikely(!((X) OP (Y)))) {					\		printk(KERN_ERR "\n");					\		printk(KERN_ERR "AFS: Assertion failed\n");		\		printk(KERN_ERR "%lu " #OP " %lu is false\n",		\		       (unsigned long)(X), (unsigned long)(Y));		\		printk(KERN_ERR "0x%lx " #OP " 0x%lx is false\n",	\		       (unsigned long)(X), (unsigned long)(Y));		\		BUG();							\	}								\} while(0)#define ASSERTRANGE(L, OP1, N, OP2, H)					\do {									\	if (unlikely(!((L) OP1 (N)) || !((N) OP2 (H)))) {		\		printk(KERN_ERR "\n");					\		printk(KERN_ERR "AFS: Assertion failed\n");		\		printk(KERN_ERR "%lu "#OP1" %lu "#OP2" %lu is false\n",	\		       (unsigned long)(L), (unsigned long)(N),		\		       (unsigned long)(H));				\		printk(KERN_ERR "0x%lx "#OP1" 0x%lx "#OP2" 0x%lx is false\n", \		       (unsigned long)(L), (unsigned long)(N),		\		       (unsigned long)(H));				\		BUG();							\	}								\} while(0)#define ASSERTIF(C, X)						\do {								\	if (unlikely((C) && !(X))) {				\		printk(KERN_ERR "\n");				\		printk(KERN_ERR "AFS: Assertion failed\n");	\		BUG();						\	}							\} while(0)#define ASSERTIFCMP(C, X, OP, Y)					\do {									\	if (unlikely((C) && !((X) OP (Y)))) {				\		printk(KERN_ERR "\n");					\		printk(KERN_ERR "AFS: Assertion failed\n");		\		printk(KERN_ERR "%lu " #OP " %lu is false\n",		\		       (unsigned long)(X), (unsigned long)(Y));		\		printk(KERN_ERR "0x%lx " #OP " 0x%lx is false\n",	\		       (unsigned long)(X), (unsigned long)(Y));		\		BUG();							\	}								\} while(0)#else#define ASSERT(X)				\do {						\} while(0)#define ASSERTCMP(X, OP, Y)			\do {						\} while(0)#define ASSERTRANGE(L, OP1, N, OP2, H)		\do {						\} while(0)#define ASSERTIF(C, X)				\do {						\} while(0)#define ASSERTIFCMP(C, X, OP, Y)		\do {						\} while(0)#endif /* __KDEBUGALL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -