函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lk_update_request - Special helper function for request stacking drivers*@req: the request being processed*@error: block status code*@nr_bytes: number of bytes to complete @req* Description:* Ends I/O on a number of bytes attached to @req, but doesn't

函数原型:bool blk_update_request(struct request *req, blk_status_t error, unsigned int nr_bytes)

返回类型:bool

参数:

类型参数名称
struct request *req
blk_status_terror
unsigned intnr_bytes
1441  lock_rq_complete - block IO operation completed by device driver*@rq: block operations request*@error: status code*@nr_bytes: number of completed bytes* The block_rq_complete tracepoint event indicates that some portion
1443  如果非bio则返回:false
1447  如果blk_integrity_rq(req)且req_op(req)恒等于REQ_OP_READerror恒等于BLK_STS_OKcomplete_fn(req, nr_bytes)
1452  如果此条件成立可能性小(为编译器优化)(error && !blk_rq_is_passthrough(req) && !(rq_flags & don't warn about errors ))则print_req_error(req, error, __func__)
1456  blk_account_io_completion(req, nr_bytes)
1458  total_bytes等于0
1459 bio循环
1460  bio等于bio
1461  bio_bytes等于两数取小( residual I/O count , nr_bytes)
1463  如果bio_bytes恒等于 residual I/O count bio等于 request queue link
1467  bio_clear_flag(bio, BIO_TRACE_COMPLETION)
1468  req_bio_endio(req, bio, bio_bytes, error)
1470  total_bytes加等于bio_bytes
1471  nr_bytes减等于bio_bytes
1473  如果非nr_bytes退出
1480  如果非bio
1486  total data len 等于0
1487  返回:false
1490  total data len 减等于total_bytes
1493  如果非blk_rq_is_passthrough(req)则 sector cursor 加等于total_bytes右移9位
1497  如果rq_flags按位与merge of different types, fail separately
1498  op and common flags 与等于REQ_FAILFAST_MASK的反
1499  op and common flags 或等于 bottom bits req flags, * top bits REQ_OP. Use * accessors.按位与REQ_FAILFAST_MASK
1502  如果非rq_flags按位与Look at ->special_vec for the actual data payload instead of thebio chain. 的值则
1507  如果blk_rq_bytes(req)小于blk_rq_cur_bytes(req)则
1508  blk_dump_rq_flags(req, "request botched")
1513  * Number of scatter-gather DMA addr+len pairs after * physical address coalescing is performed.等于blk_recalc_rq_segments(req)
1516  返回:true
调用者
名称描述
blk_mq_end_request