函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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*

函数原型:void clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len)

返回类型:void

参数:

类型参数名称
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等于blocklen减1右移PAGE_SHIFT determines the page size i_blkbits
1615  pagevec_init( & pvec)
1616 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 循环
1617  count等于pagevec_count( & pvec)
1618 i小于count循环
1619  page等于pages[i]
1621  如果非page_has_buffers(page)则继续下一循环
1630  如果非page_has_buffers(page)则转到:unlock_page
1633  bh等于head
1634  循环
1635  如果非buffer_mapped(bh)或 start block number 小于block则转到:next
1637  如果 start block number 大于等于blocklen退出
1640  wait_on_buffer(bh)
1642  :
1644 bh不等于head循环
1645  unlock_page :
1648  pagevec_release( & pvec)
1649  cond_resched()
1651  如果index大于end或非index退出
调用者
名称描述
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