函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static bool bsg_prepare_job(struct device *dev, struct request *req)

返回类型:bool

参数:

类型参数名称
struct device *dev
struct request *req
223  job等于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.
226  timeout等于timeout
228  如果bio
229  ret等于bsg_map_buffer( & DMA payloads for the request/response , req)
230  如果ret则转到:failjob_rls_job
233  如果 BIDI support
234  ret等于bsg_map_buffer( & reply_payload, BIDI support )
235  如果ret则转到:failjob_rls_rqst_payload
238  dev等于dev
240  get_device - atomically increment the reference count for the device.
241  初始化对象
242  返回:true
244  failjob_rls_rqst_payload :
245  释放内存
246  failjob_rls_job :
247  result等于负ENOMEM
248  返回:false
调用者
名称描述
bsg_queue_rqsg_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.