Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:heck_disk_size_change - checks for disk size change and adjusts bdev size

Proto:static void check_disk_size_change(struct gendisk *disk, struct block_device *bdev, bool verbose)

Type:void

Parameter:

TypeParameterName
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  If disk_size != bdev_size Then
1427  If verbose Then
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  If bdev_size > disk_size Then lush_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
Caller
NameDescribe
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