函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\block_dev.c Create Date:2022-07-29 10:46:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:heck_disk_size_change - checks for disk size change and adjusts bdev size

函数原型:static void check_disk_size_change(struct gendisk *disk, struct block_device *bdev, bool verbose)

返回类型:void

参数:

类型参数名称
struct gendisk *disk
struct block_device *bdev
boolverbose
1424  disk_size等于get_capacity(disk)左移9位
1425  bdev_size等于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
1426  如果disk_size不等于bdev_size
1427  如果verbose
1432  NOTE: unlike i_size_read(), i_size_write() does need locking around it* (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount* can be lost, resulting in subsequent i_size_read() calls spinning forever.
1433  如果bdev_size大于disk_sizelush_disk - invalidates all buffer-cache entries on a disk*@bdev: struct block device to be flushed*@kill_dirty: flag to guide handling of dirty inodes* Invalidates all buffer-cache entries on a disk
1436  bd_invalidated等于0
调用者
名称描述
revalidate_diskvalidate_disk - wrapper for lower-level driver's revalidate_disk call-back*@disk: struct gendisk to be revalidated* This routine is a wrapper for lower-level driver's revalidate_disk* call-backs. It is used to do common pre and post operations needed
bdev_disk_changed