Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\genhd.c Create Date:2022-07-28 17:19:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:disk_clear_events - synchronously check, clear and return pending events*@disk: disk to fetch and clear events from*@mask: mask of events to be fetched and cleared* Disk events are synchronously checked and pending events in @mask

Proto:unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)

Type:unsigned int

Parameter:

TypeParameterName
struct gendisk *disk
unsigned intmask
1794  bdops = fops
1795  ev = ev
1797  clearing = mask
1799  If Not ev Then
1801  If mask & DISK_EVENT_MEDIA_CHANGE && media_changed && media_changed(disk) Then Return DISK_EVENT_MEDIA_CHANGE
1804  Return 0
1807  disk_block_events - block and flush disk event checking*@disk: disk to block events for* On return from this function, it is guaranteed that event checking* isn't in progress and won't happen until unblocked by* disk_unblock_events()
1814  spin_lock_irq( & lock)
1815  clearing |= vents being cleared
1816  vents being cleared = 0
1817  spin_unlock_irq( & lock)
1819  disk_check_events(ev, & clearing)
1824  __disk_unblock_events(disk, vents being cleared ? true : false)
1827  spin_lock_irq( & lock)
1828  pending = vents already sent out & mask
1829  vents already sent out &= ~mask
1830  spin_unlock_irq( & lock)
1831  WARN_ON_ONCE(clearing & mask)
1833  Return pending