📄 raid5.h.txt
字号:
any questions,send email to netxiong@263.net
相关文件
/drivers/md/raid5.c
************************结构*********************************
struct stripe_head { //这个结构是条纹的头指针
struct stripe_head *hash_next, **hash_pprev;
struct list_head lru;
struct raid5_private_data *raid_conf;
struct buffer_head *bh_cache[MD_SB_DISKS];
struct buffer_head *bh_read[MD_SB_DISKS];
struct buffer_head *bh_write[MD_SB_DISKS];
struct buffer_head *bh_written[MD_SB_DISKS];
unsigned long sector; //对于条纹中的每一个磁盘它的扇区的读 //写都是对应于同一个扇区的
int size;
int pd_idx;
unsigned long state;
atomic_t count;
spinlock_t lock;
int sync_redone;
};
struct raid5_conf_t
struct raid5_private_data {
struct stripe_head **stripe_hashtbl;
mddev_t *mddev;
mdk_thread_t *thread, *resync_thread;
struct disk_info disks[MD_SB_DISKS];
struct disk_info *spare;
int buffer_size;
int chunk_size, //块大小,也就是每个条纹单位 //的大小,字节单位
int level, algorithm;
int raid_disks, //阵列中所有的磁盘数,不包括 //热闲置盘
int working_disks, //还在工作的磁盘数
int failed_disks;
int resync_parity;
int max_nr_stripes;
struct list_head handle_list; //需要处理的条纹 */
atomic_t active_stripes;
struct list_head inactive_list;
md_wait_queue_head_t wait_for_stripe;//等待条纹的释放,条纹的 //stripe_head有一定的数量的
md_spinlock_t device_lock;
}
typedef struct raid5_private_data raid5_conf_t //配置结构
struct disk_info {
kdev_t dev;
int operational;
int number;
int raid_disk;
int write_only;
int spare;
int used_slot;
};
*************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -