soft raid5阅读笔记之一--数据结构

本文是关于软RAID5技术的学习笔记,主要探讨了其内部的数据结构,帮助理解RAID5如何存储和校验数据,涉及关键概念和技术细节。
摘要由CSDN通过智能技术生成
1、raid5私有数据结构定义为raid5_conf_t
struct raid5_private_data {
     struct hlist_head     *stripe_hashtbl;     //所有的stripe_head通过hash连接件链入哈希表的哈希表头
     mddev_t               *mddev;                //管理MD设备的描述符指针
     struct disk_info     *spare;
     int               chunk_sectors;               //MD设备的chunk大小,可以设置
     int               level, algorithm;               //
     int               max_degraded;               //
     int               raid_disks;                        //raid5中成员磁盘的个数
     int               max_nr_stripes;               //最大的stripe个数,初始为256

     /* reshape_progress is the leading edge of a 'reshape'
     * It has value MaxSector when no reshape is happening
     * If delta_disks < 0, it is the last sector we started work on,
     * else is it the next sector to work on.
     */
     sector_t          reshape_progress;
     /* reshape_safe is the trailing edge of a reshape.  We know that
     * before (or after) this address, all reshape has completed.
     */
     sector_t          reshape_safe;
     int               previous_raid_disks;
     int               prev_chunk_sectors;
     int               prev_algo;
     short               generation; /* increments with every reshape */
     unsigned long          reshape_checkpoint; /* Time we last updated
                                   * metadata */

     struct list_head     handle_list; /* stripes needing handling */
     struct list_head     hold_list; /* preread ready stripes */
     struct list_head     delayed_list; /* stripes that have plugged requests */
     struct list_head     bitmap_list; /* stripes delaying awaiting bitmap update */
     struct bio          *retry_read_aligned; /* currently retrying aligned bios   */
     struct bio          *retry_read_aligned_list; /* aligned bios retr
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值