函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg-lib.c Create Date:2022-07-27 19:14:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sg_queue_rq - generic handler for bsg requests*@hctx: hardware queue*@bd: queue data* On error the create_bsg_job function should return a -Exyz error value* that will be set to ->result.* Drivers/subsys should pass this to the queue init function.

函数原型:static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd)

返回类型:blk_status_t

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
const struct blk_mq_queue_data *bd
264  q等于@queue: Pointer to the request queue that owns this hardware context.
265  dev等于* The queue owner gets to use this for whatever they like. * ll_rw_blk doesn't touch it.
266  req等于rq
267  bset等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(tag_set, structbsg_set, tag_set)
269  sts等于BLK_STS_IOERR
272  blk_mq_start_request(req)
274  如果非get_device - atomically increment the reference count for the device.则返回:BLK_STS_IOERR
277  如果非sg_prepare_job - create the bsg_job structure for the bsg request*@dev: device that is being sent the bsg request*@req: BSG request that needs a job structure则转到:out
280  ret等于job_fn(lk_mq_rq_to_pdu - cast a request to a PDU*@rq: the request to be casted* Return: pointer to the PDU* Driver command data is immediately after the request. So add request to get* the PDU.)
281  如果非retsts等于BLK_STS_OK
284  out :
285  put_device(dev)
286  返回:sts