blk_qc_t类型是通用块层一个类型,其定义以下:cookie
typedef unsigned int blk_qc_t;
请教了Lei ming两个问题,答复以下:code
queue cookie, which is only used by poll code path.it
#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.io