函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bdev_disk_changed

函数原型:int bdev_disk_changed(struct block_device *bdev, bool invalidate)

返回类型:int

参数:

类型参数名称
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  如果ret则返回:ret
1523  如果invalidateset_capacity(disk, 0)
1525  否则如果revalidate_diskrevalidate_disk(disk)
1528  heck_disk_size_change - checks for disk size change and adjusts bdev size
1530  如果get_capacity(disk)则
1531  ret等于blk_add_partitions(disk, bdev)
1532  如果ret恒等于负EAGAIN则转到:rescan
1534  否则如果invalidate
1539  通过发送一个uevent通知用户空间
1542  返回:ret
调用者
名称描述
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)