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:bdev_disk_changed

Proto:int bdev_disk_changed(struct block_device *bdev, bool invalidate)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
boolinvalidate
1513  disk = bd_disk
1516  lockdep_assert_held( & open/close mutex )
1518  rescan :
1519  ret = blk_drop_partitions(disk, bdev)
1520  If ret Then Return ret
1523  If invalidate Then set_capacity(disk, 0)
1525  Else if revalidate_disk Then revalidate_disk(disk)
1528  heck_disk_size_change - checks for disk size change and adjusts bdev size
1530  If get_capacity(disk) Then
1531  ret = blk_add_partitions(disk, bdev)
1532  If ret == -EAGAIN Then Go to rescan
1534  Else if invalidate Then
1539  kobject_uevent - notify userspace by sending an uevent*@kobj: struct kobject that the action is happening to*@action: action that is happening* Returns 0 if kobject_uevent() is completed with success or the* corresponding error when it fails.
1542  Return ret
Caller
NameDescribe
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)