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:This routine checks whether a removable media has been changed,* and invalidates all buffer-cache-entries in that case. This* is a relatively slow routine, so we have to try to minimize using* it. Thus it is called only upon a 'mount' or 'open'. This

Proto:int check_disk_change(struct block_device *bdev)

Type:int

Parameter:

TypeParameterName
struct block_device *bdev
1484  disk = bd_disk
1485  bdops = fops
1488  events = disk_clear_events(disk, DISK_EVENT_MEDIA_CHANGE | DISK_EVENT_EJECT_REQUEST)
1490  If Not (events & DISK_EVENT_MEDIA_CHANGE) Then Return 0
1493  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
1494  If revalidate_disk Then revalidate_disk(bd_disk)
1496  Return 1