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