kernel 부분 데이터 구조 목록 2 (슈퍼 블록)

4056 단어 kernel


/*
* super_block , linux/fs.h
*
*/

struct super_block {
struct list_head s_list; /* */
dev_t s_dev; /* */
unsigned long s_blocksize; /* */
unsigned long s_old_blocksize; /* */
unsigned char s_blocksize_bits; /* */
unsigned char s_dirt; /* */
unsigned long long s_maxbytes; /* */
struct file_system_type s_type; /* */
struct super_operations s_op; /* */
struct dquot_operations *dq_op; /* */
struct quotactl_ops *s_qcop; /* */
struct export_operations *s_export_op; /* */
unsigned long s_flags; /* */
unsigned long s_magic; /* */
struct dentry *s_root; /* */
struct rw_semaphore s_umount; /* */
struct semaphore s_lock; /* */
int s_count; /* */
int s_syncing; /* */
int s_need_sync_fs; /* */
atomic_t s_active; /* */
void *s_security; /* */
struct list_head s_dirty; /* */
struct list_head s_io; /* */
struct hlist_head s_anon; /* */
struct list_head s_files; /* */
struct block_device *s_bdev; /* */
struct list_head s_instances; /* */
struct quota_info s_dquot; /* */
char s_id[32]; /* */
void *s_fs_info; /* */
struct semaphore s_vfs_rename_sem; /* */
};

/*
* s_op 。 struct super_operations , linux/fs.h
*/
struct super_operations {
struct inode *(*alloc_inode) (struct super_block *sb);
/* */
void (*destroy_inode) (struct inode *);
/* */
void (*read_inode) (struct inode *);
/* inode->i_ino , , */
void (*dirty_inode) (struct inode *);
/*VFS ( ) , (ect3 ) */
void (*write_inode) (struct inode *, int);
/* ,wait */
void (*put_inode) (struct inode *);
/* */
void (*drop_inode) (struct inode *);
/* ,VFS */
void (*delete_inode) (struct inode *);
/* */
void (*put_super) (struct super_block *);
/* VFS , */
void (*write_super) (struct super_block *);
/* */
int (*sync_fs) (struct super_block *, int);
/* */
void (*write_super_lockfs) (struct super_block *);
/* , 。LVM */
void (*unlockfs) (struct super_block *);
/* */
int (*statfs) (struct super_block *, struct statfs *);
/*VFS , statfs */
int (*remount_fs) (struct super_block *, int *, char *);
/* ,vfs */
void (*clear_inode) (struct inode *);
/* */
void (*umount_begin) (struct super_block *);
/* , */
int (*show_options) (struct seq_file *, struct vfsmount *);
};

좋은 웹페이지 즐겨찾기