📄 genhd.h.txt
字号:
any questions,send email to netxiong@263.net
这是普通硬盘的分区头文件
相关文件:
/drivers/block/genhd.c
************************基本数据结构*********************************
(1):struct gendisk {
int major; /* major number of driver */
const char *major_name; /* name of major driver */
int minor_shift; /* number of times minor is shifted to
get real minor */
int max_p; /* maximum partitions per device */
struct hd_struct *part; /* [indexed by minor] */
int *sizes; /* [idem], device size in blocks */
int nr_real; /* number of real devices */
void *real_devices; /* internal use */
struct gendisk *next;
struct block_device_operations *fops;
devfs_handle_t *de_arr; /* one per physical disc */
char *flags; /* one per physical disc */
};
(2):struct hd_struct {
long start_sect; //开始扇区
long nr_sects; //扇区数量
devfs_handle_t de; //devfs的入口
/* Performance status: */
unsigned int ios_in_flight;
unsigned int io_ticks;
unsigned int last_idle_time;
unsigned int last_queue_change;
unsigned int aveq;
unsigned int rd_ios;
unsigned int rd_merges;
unsigned int rd_ticks;
unsigned int rd_sectors;
unsigned int wr_ios;
unsigned int wr_merges;
unsigned int wr_ticks;
unsigned int wr_sectors;
};
*********************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -