About blk_qc_t

blk_qc_t類型是通用塊層一個類型,其定義以下:cookie

typedef unsigned int blk_qc_t;

請教了Lei ming兩個問題,答覆以下:code

  1. qc, 很好奇qc是什麼的縮寫?queue code?

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

  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.io

本站公眾號
   歡迎關注本站公眾號,獲取更多信息