Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lean_bdev_aliases: clean a range of buffers in block device*@bdev: Block device to clean buffers in*@block: Start of a range of blocks to clean*@len: Number of blocks to clean* We are taking a range of blocks for data and we don't want writeback of any*

Proto:void clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len)

Type:void

Parameter:

TypeParameterName
struct block_device *bdev
sector_tblock
sector_tlen
1605  bd_inode = will die
1606  bd_mapping = i_mapping
1608  index = block >> PAGE_SHIFT determines the page size - i_blkbits
1614  end = block + len - 1 >> PAGE_SHIFT determines the page size - i_blkbits
1615  pagevec_init( & pvec)
1616  When pagevec_lookup_range - gang pagecache lookup*@pvec: Where the resulting pages are placed*@mapping: The address_space to search*@start: The starting page index*@end: The final page index* pagevec_lookup_range() will search for & return a group of up to cycle
1617  count = pagevec_count( & pvec)
1618  When i < count cycle
1619  page = pages[i]
1621  If Not page_has_buffers(page) Then Continue
1630  If Not page_has_buffers(page) Then Go to unlock_page
1633  bh = head
1634  Do
1635  If Not buffer_mapped(bh) || start block number < block Then Go to next
1637  If start block number >= block + len Then Break
1640  wait_on_buffer(bh)
1642  :
1644  When bh != head cycle
1645  unlock_page :
1648  pagevec_release( & pvec)
1649  cond_resched()
1651  If index > end || Not index Then Break
Caller
NameDescribe
do_direct_IOWalk the user pages, and the file, mapping blocks to disk and generating* a sequence of (page,offset,len,block) mappings. These mappings are injected* into submit_page_section(), which takes care of the next stage of submission
clean_bdev_bh_alias