Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\seek.c Create Date:2022-07-28 20:32:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Seek for SEEK_DATA / SEEK_HOLE within @page, starting at @lastoff.* Returns true if found and updates @lastoff to the offset in file.

Proto:static bool page_seek_hole_data(struct inode *inode, struct page *page, loff_t *lastoff, int whence)

Type:bool

Parameter:

TypeParameterName
struct inode *inode
struct page *page
loff_t *lastoff
intwhence
21  ops = a_ops
22  bsize = i_blocksize(inode)
23  seek_data = whence == seek to the next data
24  poff = Return byte-offset into filesystem object for page.
26  If WARN_ON_ONCE( * lastoff >= poff + PAGE_SIZE) Then Return false
29  If lastoff < poff Then
34  If whence == seek to the next hole Then Return true
36  lastoff = poff
42  If bsize == PAGE_SIZE || Not is_partially_uptodate Then Return PageUptodate(page) == seek_data
45  lock_page may only be called if we have the page's inode pinned.
46  If Value for the false possibility is greater at compile time( See page-flags.h for PAGE_MAPPING_FLAGS != i_mapping) Then Go to out_unlock_not_found
49  When off < PAGE_SIZE cycle
50  If offset_in_page( * lastoff) >= off + bsize Then Continue
54  Return true
56  lastoff = poff + off + bsize
59  out_unlock_not_found :
60  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
61  Return false
Caller
NameDescribe
page_cache_seek_hole_dataSeek for SEEK_DATA / SEEK_HOLE in the page cache.* Within unwritten extents, the page cache determines which parts are holes* and which are data: uptodate buffer heads count as data; everything else* counts as a hole.