Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\blk-cgroup.h Create Date:2022-07-28 05:57:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blkcg_bio_issue_check

Proto:static inline bool blkcg_bio_issue_check(struct request_queue *q, struct bio *bio)

Type:bool

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
586  bool throtl = false
588  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
590  If Not * Represents the association of the css and request_queue for the bio. * If a bio goes direct to device, it will not have a blkg as it will * not have a request_queue associated with it. The reference is put * on release of the bio. Then
593  WARN_ONCE(1, "no blkg associated for bio on block-device: %s\n", bio_devname(bio, b))
596  _associate_blkg - associate a bio with a blkg*@bio: target bio* Associate @bio with the blkg found from the bio's css and request_queue
599  blkg = * Represents the association of the css and request_queue for the bio. * If a bio goes direct to device, it will not have a blkg as it will * not have a request_queue associated with it. The reference is put * on release of the bio.
601  throtl = blk_throtl_bio(q, blkg, bio)
603  If Not throtl Then
607  If op_is_discard( bottom bits req flags, * top bits REQ_OP. Use * accessors.) Then rwd = BLKG_IOSTAT_DISCARD
609  Else if op_is_write( bottom bits req flags, * top bits REQ_OP. Use * accessors.) Then rwd = BLKG_IOSTAT_WRITE
611  Else rwd = BLKG_IOSTAT_READ
614  cpu = get_cpu()
615  bis = per_cpu_ptr(iostat_cpu, cpu)
616  u64_stats_update_begin( & sync)
623  If Not bio_flagged(bio, BIO_QUEUE_ENTERED) Then bytes[rwd] += residual I/O count
625  ios[rwd]++
627  u64_stats_update_end( & sync)
628  If cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(io_cgrp_subsys) Then group_rstat_updated - keep track of updated rstat_cpu*@cgrp: target cgroup*@cpu: cpu on which rstat_cpu was updated*@cgrp's rstat_cpu on @cpu was updated. Put it on the parent's matching* rstat_cpu->updated_children list. See the comment on top of
630  put_cpu()
633  blkcg_bio_issue_init(bio)
635  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
636  Return Not throtl
Caller
NameDescribe
generic_make_request_checks