About blk_qc_t

blk_qc_t类型是通用块层一个类型,其定义如下:

typedef unsigned int blk_qc_t;

请教了Lei ming两个问题,答复如下:

  1. qc, 很好奇qc是什么的缩写?queue code?

queue cookie, which is only used by poll code path.

  1. 下面3个宏定义代表什么含义呢?
#define BLK_QC_T_NONE           -1U
#define BLK_QC_T_SHIFT          16
#define BLK_QC_T_INTERNAL       (1U << 31)

NONE means the submitted bio needn't to be polled. It is used in request_to_qc_t(), and BLK_QC_T_INTERNAL means the tag is a internal tag, which is used for IO scheduler, and if it isn't set, it means the tag is a driver tag, which is for submitting IO to hardware/driver.

猜你喜欢

转载自my.oschina.net/u/2475751/blog/1601010