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

📄 internal.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
/* * AFS volume access record */struct afs_volume {	atomic_t		usage;	struct afs_cell		*cell;		/* cell to which belongs (unrefd ptr) */	struct afs_vlocation	*vlocation;	/* volume location */#ifdef AFS_CACHING_SUPPORT	struct cachefs_cookie	*cache;		/* caching cookie */#endif	afs_volid_t		vid;		/* volume ID */	afs_voltype_t		type;		/* type of volume */	char			type_force;	/* force volume type (suppress R/O -> R/W) */	unsigned short		nservers;	/* number of server slots filled */	unsigned short		rjservers;	/* number of servers discarded due to -ENOMEDIUM */	struct afs_server	*servers[8];	/* servers on which volume resides (ordered) */	struct rw_semaphore	server_sem;	/* lock for accessing current server */};/* * vnode catalogue entry */struct afs_cache_vnode {	afs_vnodeid_t		vnode_id;	/* vnode ID */	unsigned		vnode_unique;	/* vnode ID uniquifier */	afs_dataversion_t	data_version;	/* data version */};/* * AFS inode private data */struct afs_vnode {	struct inode		vfs_inode;	/* the VFS's inode record */	struct afs_volume	*volume;	/* volume on which vnode resides */	struct afs_server	*server;	/* server currently supplying this file */	struct afs_fid		fid;		/* the file identifier for this inode */	struct afs_file_status	status;		/* AFS status info for this file */#ifdef AFS_CACHING_SUPPORT	struct cachefs_cookie	*cache;		/* caching cookie */#endif	struct afs_permits	*permits;	/* cache of permits so far obtained */	struct mutex		permits_lock;	/* lock for altering permits list */	struct mutex		validate_lock;	/* lock for validating this vnode */	wait_queue_head_t	update_waitq;	/* status fetch waitqueue */	int			update_cnt;	/* number of outstanding ops that will update the						 * status */	spinlock_t		writeback_lock;	/* lock for writebacks */	spinlock_t		lock;		/* waitqueue/flags lock */	unsigned long		flags;#define AFS_VNODE_CB_BROKEN	0		/* set if vnode's callback was broken */#define AFS_VNODE_UNSET		1		/* set if vnode attributes not yet set */#define AFS_VNODE_MODIFIED	2		/* set if vnode's data modified */#define AFS_VNODE_ZAP_DATA	3		/* set if vnode's data should be invalidated */#define AFS_VNODE_DELETED	4		/* set if vnode deleted on server */#define AFS_VNODE_MOUNTPOINT	5		/* set if vnode is a mountpoint symlink */#define AFS_VNODE_LOCKING	6		/* set if waiting for lock on vnode */#define AFS_VNODE_READLOCKED	7		/* set if vnode is read-locked on the server */#define AFS_VNODE_WRITELOCKED	8		/* set if vnode is write-locked on the server */#define AFS_VNODE_UNLOCKING	9		/* set if vnode is being unlocked on the server */	long			acl_order;	/* ACL check count (callback break count) */	struct list_head	writebacks;	/* alterations in pagecache that need writing */	struct list_head	pending_locks;	/* locks waiting to be granted */	struct list_head	granted_locks;	/* locks granted on this file */	struct delayed_work	lock_work;	/* work to be done in locking */	struct key		*unlock_key;	/* key to be used in unlocking */	/* outstanding callback notification on this file */	struct rb_node		server_rb;	/* link in server->fs_vnodes */	struct rb_node		cb_promise;	/* link in server->cb_promises */	struct work_struct	cb_broken_work;	/* work to be done on callback break */	time_t			cb_expires;	/* time at which callback expires */	time_t			cb_expires_at;	/* time used to order cb_promise */	unsigned		cb_version;	/* callback version */	unsigned		cb_expiry;	/* callback expiry time */	afs_callback_type_t	cb_type;	/* type of callback */	bool			cb_promised;	/* true if promise still holds */};/* * cached security record for one user's attempt to access a vnode */struct afs_permit {	struct key		*key;		/* RxRPC ticket holding a security context */	afs_access_t		access_mask;	/* access mask for this key */};/* * cache of security records from attempts to access a vnode */struct afs_permits {	struct rcu_head		rcu;		/* disposal procedure */	int			count;		/* number of records */	struct afs_permit	permits[0];	/* the permits so far examined */};/* * record of one of a system's set of network interfaces */struct afs_interface {	struct in_addr	address;	/* IPv4 address bound to interface */	struct in_addr	netmask;	/* netmask applied to address */	unsigned	mtu;		/* MTU of interface */};/* * UUID definition [internet draft] * - the timestamp is a 60-bit value, split 32/16/12, and goes in 100ns *   increments since midnight 15th October 1582 *   - add AFS_UUID_TO_UNIX_TIME to convert unix time in 100ns units to UUID *     time * - the clock sequence is a 14-bit counter to avoid duplicate times */struct afs_uuid {	u32		time_low;			/* low part of timestamp */	u16		time_mid;			/* mid part of timestamp */	u16		time_hi_and_version;		/* high part of timestamp and version  */#define AFS_UUID_TO_UNIX_TIME	0x01b21dd213814000ULL#define AFS_UUID_TIMEHI_MASK	0x0fff#define AFS_UUID_VERSION_TIME	0x1000	/* time-based UUID */#define AFS_UUID_VERSION_NAME	0x3000	/* name-based UUID */#define AFS_UUID_VERSION_RANDOM	0x4000	/* (pseudo-)random generated UUID */	u8		clock_seq_hi_and_reserved;	/* clock seq hi and variant */#define AFS_UUID_CLOCKHI_MASK	0x3f#define AFS_UUID_VARIANT_STD	0x80	u8		clock_seq_low;			/* clock seq low */	u8		node[6];			/* spatially unique node ID (MAC addr) */};/*****************************************************************************//* * callback.c */extern void afs_init_callback_state(struct afs_server *);extern void afs_broken_callback_work(struct work_struct *);extern void afs_break_callbacks(struct afs_server *, size_t,				struct afs_callback[]);extern void afs_discard_callback_on_delete(struct afs_vnode *);extern void afs_give_up_callback(struct afs_vnode *);extern void afs_dispatch_give_up_callbacks(struct work_struct *);extern void afs_flush_callback_breaks(struct afs_server *);extern int __init afs_callback_update_init(void);extern void afs_callback_update_kill(void);/* * cell.c */extern struct rw_semaphore afs_proc_cells_sem;extern struct list_head afs_proc_cells;#ifdef AFS_CACHING_SUPPORTextern struct cachefs_index_def afs_cache_cell_index_def;#endif#define afs_get_cell(C) do { atomic_inc(&(C)->usage); } while(0)extern int afs_cell_init(char *);extern struct afs_cell *afs_cell_create(const char *, char *);extern struct afs_cell *afs_cell_lookup(const char *, unsigned);extern struct afs_cell *afs_grab_cell(struct afs_cell *);extern void afs_put_cell(struct afs_cell *);extern void afs_cell_purge(void);/* * cmservice.c */extern bool afs_cm_incoming_call(struct afs_call *);/* * dir.c */extern const struct inode_operations afs_dir_inode_operations;extern const struct file_operations afs_dir_file_operations;extern int afs_permission(struct inode *, int, struct nameidata *);/* * file.c */extern const struct address_space_operations afs_fs_aops;extern const struct inode_operations afs_file_inode_operations;extern const struct file_operations afs_file_operations;extern int afs_open(struct inode *, struct file *);extern int afs_release(struct inode *, struct file *);/* * flock.c */extern void __exit afs_kill_lock_manager(void);extern void afs_lock_work(struct work_struct *);extern void afs_lock_may_be_available(struct afs_vnode *);extern int afs_lock(struct file *, int, struct file_lock *);extern int afs_flock(struct file *, int, struct file_lock *);/* * fsclient.c */extern int afs_fs_fetch_file_status(struct afs_server *, struct key *,				    struct afs_vnode *, struct afs_volsync *,				    const struct afs_wait_mode *);extern int afs_fs_give_up_callbacks(struct afs_server *,				    const struct afs_wait_mode *);extern int afs_fs_fetch_data(struct afs_server *, struct key *,			     struct afs_vnode *, off_t, size_t, struct page *,			     const struct afs_wait_mode *);extern int afs_fs_create(struct afs_server *, struct key *,			 struct afs_vnode *, const char *, umode_t,			 struct afs_fid *, struct afs_file_status *,			 struct afs_callback *,			 const struct afs_wait_mode *);extern int afs_fs_remove(struct afs_server *, struct key *,			 struct afs_vnode *, const char *, bool,			 const struct afs_wait_mode *);extern int afs_fs_link(struct afs_server *, struct key *, struct afs_vnode *,		       struct afs_vnode *, const char *,		       const struct afs_wait_mode *);extern int afs_fs_symlink(struct afs_server *, struct key *,			  struct afs_vnode *, const char *, const char *,			  struct afs_fid *, struct afs_file_status *,			  const struct afs_wait_mode *);extern int afs_fs_rename(struct afs_server *, struct key *,			 struct afs_vnode *, const char *,			 struct afs_vnode *, const char *,			 const struct afs_wait_mode *);extern int afs_fs_store_data(struct afs_server *, struct afs_writeback *,			     pgoff_t, pgoff_t, unsigned, unsigned,			     const struct afs_wait_mode *);extern int afs_fs_setattr(struct afs_server *, struct key *,			  struct afs_vnode *, struct iattr *,			  const struct afs_wait_mode *);extern int afs_fs_get_volume_status(struct afs_server *, struct key *,				    struct afs_vnode *,				    struct afs_volume_status *,				    const struct afs_wait_mode *);extern int afs_fs_set_lock(struct afs_server *, struct key *,			   struct afs_vnode *, afs_lock_type_t,			   const struct afs_wait_mode *);extern int afs_fs_extend_lock(struct afs_server *, struct key *,			      struct afs_vnode *,			      const struct afs_wait_mode *);extern int afs_fs_release_lock(struct afs_server *, struct key *,			       struct afs_vnode *,			       const struct afs_wait_mode *);/* * inode.c */extern struct inode *afs_iget(struct super_block *, struct key *,			      struct afs_fid *, struct afs_file_status *,			      struct afs_callback *);extern void afs_zap_data(struct afs_vnode *);extern int afs_validate(struct afs_vnode *, struct key *);extern int afs_getattr(struct vfsmount *, struct dentry *, struct kstat *);extern int afs_setattr(struct dentry *, struct iattr *);extern void afs_clear_inode(struct inode *);/* * main.c */extern struct afs_uuid afs_uuid;#ifdef AFS_CACHING_SUPPORTextern struct cachefs_netfs afs_cache_netfs;#endif/* * misc.c */extern int afs_abort_to_error(u32);/* * mntpt.c */extern const struct inode_operations afs_mntpt_inode_operations;extern const struct file_operations afs_mntpt_file_operations;extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);extern void afs_mntpt_kill_timer(void);extern void afs_umount_begin(struct vfsmount *, int);/* * proc.c */extern int afs_proc_init(void);extern void afs_proc_cleanup(void);extern int afs_proc_cell_setup(struct afs_cell *);extern void afs_proc_cell_remove(struct afs_cell *);/* * rxrpc.c */extern int afs_open_socket(void);extern void afs_close_socket(void);extern int afs_make_call(struct in_addr *, struct afs_call *, gfp_t,			 const struct afs_wait_mode *);

⌨️ 快捷键说明

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