当前位置: 首页 > 图灵资讯 > 技术篇> 初始化请求blk_rq_init

初始化请求blk_rq_init

来源:图灵教育
时间:2023-05-30 09:32:31

blk_rq_init()

1. __get_request

2. blk_kick_flush

3. clone_old_rq

4. ide_prep_sense

5. scsi_ioctl_reset

void blk_rq_init(struct request_queue *q, struct request *rq){memset(rq, 0, sizeof(*rq));INIT_LIST_HEAD(&rq->queuelist);INIT_LIST_HEAD(&rq->timeout_list);rq->cpu = -1;rq->q = q;rq->__sector = (sector_t) -1;INIT_HLIST_NODE(&rq->hash);RB_CLEAR_NODE(&rq->rb_node);rq->cmd = rq->__cmd;rq->cmd_len = BLK_MAX_CDB;rq->tag = -1;rq->start_time = jiffies;set_start_time_ns(rq);rq->part = NULL;}EXPORT_SYMBOL(blk_rq_init);