Chinese translated version of Documentation\block\request
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 金丽丽 819153113@qq.com
---------------------------------------------------------------------
Documentation\block\request 的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 金丽丽 819153113@qq.com
中文版翻译者: 金丽丽 819153113@qq.com
中文版校译者: 赵晶 anana53@qq.com
以下为正文
---------------------------------------------------------------------
struct request documentation
结构请求文档
Jens Axboe <jens.axboe@oracle.com> 27/05/02
作者:Jens Axboe <jens.axboe@oracle.com> 时间:27/05/02
1.0 Index
1.0 指针
2.0 Struct request members classification
2.0 结构请求成员分类
2.1 struct request members explanation
2.1 结构请求成员解释
3.0
2.0 Short explanation of request members
简要描述请求成员
Classification flags:
D driver member
D 驱动成员
B block layer member
B 块层成员
I I/O scheduler member
I I/O调度成员
Unless an entry contains a D classification, a device driver must not access this member.
除非条目里包含一个D的分类,否则该设备驱动程序不能访问这些成员。
Some members may contain D classifications, but should only be access through certain macros or functions (eg ->flags).
有些成员可能包含D分类,但只应通过特定的宏或函数访问(例如 - >标志) 。
<linux/blkdev.h>
2.1Member Flag Comment
成员标志讨论
------ ---- -------
struct list_head queuelist BI Organization on various internal queues
struct list_head queuelist BI 组织各种内部队列
void *elevator_private I I/O scheduler private data
void *elevator_private I I/O调度私有数据
unsigned char cmd[16] D Driver can use this for setting up a cdb before execution, see blk_queue_prep_rq
unsigned char cmd[16] D 驱动程序可以利用它在执行前建立通用数据总线
unsigned long flags DBI Contains info about data direction,request type, etc.
unsigned long flags DBI 包含数据传输方向、请求类型等信息
int rq_status D Request status bits
int rq_status D 请求状态位
kdev_t rq_dev DBI Target device
kdev_t rq_dev DBI 目标设备
int errors DB Error counts
int errors DB 错误计数
sector_t sector DBI Target location
sector_t sector DBI 目标位置
unsigned long hard_nr_sectors B Used to keep sector sane
unsigned long hard_nr_sectors B 用于保持扇区的健全
unsigned long nr_sectors DBI Total number of sectors in request
unsigned long nr_sectors DBI 请求的扇区总数
unsigned long hard_nr_sectors B Used to keep nr_sectors sane
unsigned long hard_nr_sectors B 用于保持nr_sectors的健全
unsigned short nr_phys_segments DB Number of physical scatter gather segments in a request
unsigned short nr_phys_segments DB 收集一个请求中段的物理碎片的数目
unsigned short nr_hw_segments DB Number of hardware scatter gather segments in a request
unsigned short nr_hw_segments DB 收集一个请求中段的硬件碎片的数目
unsigned int current_nr_sectors DB Number of sectors in first segment of request
unsigned int current_nr_sectors DB 请求中首段的碎片数量
unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane
unsigned int hard_cur_sectors B 用于保持current_nr_sectors扇区
int tag DB TCQ tag, if assigned
int tag DB 分配时用于TCQ标记
void *special D Free to be used by driver
void *special D 可供驱动程序免费使用
char *buffer D Map of first segment, also see section on bouncing SECTION
char *buffer D 用于匹配首段,也可看到节跳跃部分
struct completion *waiting D Can be used by driver to get signalled on request completion
struct completion *waiting D 驱动程序用它接收请求完成的信号
struct bio *bio DBI First bio in request
struct bio *bio DBI 请求中的第一bio
struct bio *biotail DBI Last bio in request
struct bio *biotail DBI 请求中的最后bio
struct request_queue *q DB Request queue this request belongs to
struct request_queue *q DB 该请求所属的请求队列
struct request_list *rl B Request list this request came from
struct request_list *rl B 请求来源于哪个请求队列