Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-28 17:17:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:disk_part_iter_next - proceed iterator to the next partition and return it*@piter: iterator of interest* Proceed @piter to the next partition and return it.* CONTEXT:* Don't care.

Proto:struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)

Type:struct hd_struct

Parameter:

TypeParameterName
struct disk_part_iter *piter
198  disk_put_part(part)
199  part = NULL
202  _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
203  ptbl = fetch RCU-protected pointer for dereferencing( Array of pointers to partitions indexed by partno. * Protected with matching bdev lock but stat and other * non-critical accesses use RCU. Always access through * helpers.)
206  If flags & rate in the reverse direction Then
207  inc = -1
208  If flags & (clude partition 0 | clude empty partition 0 ) Then end = -1
211  Else end = 0
213  Else
214  inc = 1
215  end = len
219  When idx != end cycle
222  part = fetch RCU-protected pointer for dereferencing(part[idx])
223  If Not part Then Continue
225  If Not Any access of part->nr_sects which is not protected by partition* bd_mutex or gendisk bdev bd_mutex, should be done using this* accessor function && Not (flags & clude 0-sized parts ) && Not ( flags & clude empty partition 0 && idx == 0 ) Then Continue
231  get_device - atomically increment the reference count for the device.
232  part = part
233  idx += inc
234  Break
237  _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()
239  Return part
Caller
NameDescribe
blkpg_ioctl
register_disk
del_gendisk
printk_all_partitionsprint a full list of all partitions - intended for places where the root* filesystem can't be mounted and thus to give the victim some idea of what* went wrong
show_partition
diskstats_showaggregate disk stat collector. Uses the same stats that the sysfs* entries do, above, but makes them available through one seq_file.* The output looks suspiciously like /proc/partitions with a bunch of* extra fields.
set_disk_ro
blk_drop_partitions