函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:generic_make_request_checks

函数原型:static __attribute__((__noinline__)) bool generic_make_request_checks(struct bio *bio)

返回类型:bool

参数:

类型参数名称
struct bio *bio
872  nr_sectors等于bio_sectors(bio)
873  status等于BLK_STS_IOERR
876  might_sleep()
878  q等于queue
879  如果此条件成立可能性小(为编译器优化)(!q)则
880  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
884  转到:end_io
892  如果 bottom bits req flags, * top bits REQ_OP. Use * accessors.按位与REQ_NOWAIT且非queue_is_mq(q)则
893  status等于BLK_STS_AGAIN
894  转到:end_io
897  如果should_fail_bio(bio)则转到:end_io
900  如果bi_partno
901  如果此条件成立可能性小(为编译器优化)(Remap block n of partition p to block n+start(p) of the disk.)则转到:end_io
903  否则
904  如果此条件成立可能性小(为编译器优化)(bio_check_ro(bio, & part0))则转到:end_io
906  如果此条件成立可能性小(为编译器优化)(Check whether this bio extends beyond the end of the device or partition.* This may well happen - the kernel calls bread() without checking the size of* the device, e.g., when mounting a file system.)则转到:end_io
915  如果Check if the bio or request is one that needs special treatment in the* flush state machine.且非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
917  bottom bits req flags, * top bits REQ_OP. Use * accessors.与等于REQ_PREFLUSH按位或REQ_FUA的值的反
918  如果非nr_sectors
919  status等于BLK_STS_OK
920  转到:end_io
924  如果非st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from bottom bits req flags, * top bits REQ_OP. Use * accessors.与等于REQ_HIPRI的反
928  :bio_op(bio)恒等于REQ_OP_DISCARD
929  如果非blk_queue_discard(q)则转到:not_supported
931  退出
932  :bio_op(bio)恒等于REQ_OP_SECURE_ERASE
933  如果非blk_queue_secure_erase(q)则转到:not_supported
935  退出
936  :bio_op(bio)恒等于REQ_OP_WRITE_SAME
937  如果非max_write_same_sectors则转到:not_supported
939  退出
940  :bio_op(bio)恒等于REQ_OP_ZONE_RESET
941  :bio_op(bio)恒等于REQ_OP_ZONE_OPEN
942  :bio_op(bio)恒等于REQ_OP_ZONE_CLOSE
943  :bio_op(bio)恒等于REQ_OP_ZONE_FINISH
944  如果非blk_queue_is_zoned(q)则转到:not_supported
946  退出
947  :bio_op(bio)恒等于REQ_OP_ZONE_RESET_ALL
948  如果非blk_queue_is_zoned(q)或非blk_queue_zone_resetall(q)则转到:not_supported
950  退出
951  :bio_op(bio)恒等于REQ_OP_WRITE_ZEROES
952  如果非max_write_zeroes_sectors则转到:not_supported
954  退出
955  默认
956  退出
965  reate_io_context - try to create task->io_context*@gfp_mask: allocation mask*@node: allocation node* If %current->io_context is %NULL, allocate a new io_context and install* it. Returns the current %current->io_context which may be %NULL if
967  如果非blkcg_bio_issue_check(q, bio)则返回:false
970  如果非bio_flagged(bio, BIO_TRACE_COMPLETION)则
971  lock_bio_queue - putting new block IO operation in queue*@q: queue holding operation*@bio: new block operation* About to place the block IO operation @bio into queue @q.
975  bio_set_flag(bio, BIO_TRACE_COMPLETION)
977  返回:true
979  not_supported :
980  status等于BLK_STS_NOTSUPP
981  end_io :
982  bi_status等于status
983  _endio - end I/O on a bio*@bio: bio* Description:* bio_endio() will end I/O on the whole bio. bio_endio() is the preferred* way to end I/O on a bio. No one should call bi_end_io() directly on a
984  返回:false
调用者
名称描述
generic_make_requestgeneric_make_request - hand a buffer to its device driver for I/O*@bio: The bio describing the location in memory and on the device.* generic_make_request() is used to make I/O requests of block* devices
direct_make_requestdirect_make_request - hand a buffer directly to its device driver for I/O*@bio: The bio describing the location in memory and on the device.* This function behaves like generic_make_request(), but does not protect* against recursion