Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:disk_map_sector_rcu - map sector to partition*@disk: gendisk of interest*@sector: sector to map* Find out which partition @sector maps to on @disk. This is* primarily used for stats accounting.* CONTEXT:* RCU read locked

Proto:struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, sector_t sector)

Type:struct hd_struct

Parameter:

TypeParameterName
struct gendisk *disk
sector_tsector
286  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.)
288  part = fetch RCU-protected pointer for dereferencing(last_lookup)
289  If part && sector_in_part(part, sector) Then Return part
292  When i < len cycle
293  part = fetch RCU-protected pointer for dereferencing(part[i])
295  If part && sector_in_part(part, sector) Then
297  Return part
300  Return part0