函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:disk_part_iter_init - initialize partition iterator*@piter: iterator to initialize*@disk: disk to iterate over*@flags: DISK_PITER_* flags* Initialize @piter so that it iterates over partitions of @disk.* CONTEXT:* Don't care.

函数原型:void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk, unsigned int flags)

返回类型:void

参数:

类型参数名称
struct disk_part_iter *piter
struct gendisk *disk
unsigned intflags
164  _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
165  ptbl等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().( 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.)
167  disk等于disk
168  part = NULL
170  如果flags按位与rate in the reverse direction idx等于len减1
172  否则如果flags按位与clude partition 0 按位或clude empty partition 0 的值则idx等于0
174  否则idx等于1
177  flags等于flags
179  _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()
调用者
名称描述
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