I am pretty new to Linux kernel programming and I am supposed to create a new RAID level for a course. This is why I am asking myself some questions about the functions and structures contained in the md.c file and especially about the structure mddev
defined here.
As you can see there are nearly no comments about the structure in itself. I simply do not understand what is the main role of that and what is the big difference with md_personality
? Both seem to define the RAID functionality.
问问题
246 次
1 回答
0
据我了解,每当您使用具有特定 RAID 级别的 mdadm 实用程序创建任何新的 RAID 设备时,MD 层都会创建 mddev 结构,该结构包含与新创建的设备相关的信息,例如新创建的设备的主次编号、允许的最大设备数等。
md_personality 与您在 mdadm 中给出的团队副本级别有关。它包含可以在 RAID 设备上执行的 RAID 级别和支持的操作。md_personality 本身就是 mddev 的一部分。
在您的情况下,我认为您需要为自己的目的创建新的个性,就像其他个性一样,即 RAID 5 级别的 raid5_personality。
于 2015-03-16T09:02:49.287 回答