Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:iomap_readpages

Proto:int iomap_readpages(struct address_space *mapping, struct list_head *pages, unsigned nr_pages, const struct iomap_ops *ops)

Type:int

Parameter:

TypeParameterName
struct address_space *mapping
struct list_head *pages
unsignednr_pages
const struct iomap_ops *ops
430  struct iomap_readpage_ctx ctx = {pages = pages, is_readahead = true, }
434  pos = Return byte-offset into filesystem object for page.
435  last = Return byte-offset into filesystem object for page.
436  length = last - pos + PAGE_SIZE , ret = 0
438  trace_iomap_readpages(host, nr_pages)
440  When length > 0 cycle
441  ret = Execute a iomap write on a segment of the mapping that spans a* contiguous range of pages that have identical block mapping state
443  If ret <= 0 Then
444  WARN_ON_ONCE(ret == 0)
445  Go to done
447  pos += ret
448  length -= ret
450  ret = 0
451  done :
452  If bio Then submit_bio(bio)
454  If cur_page Then
455  If Not cur_page_in_bio Then 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.
457  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
464  WARN_ON_ONCE(!ret && !list_empty - tests whether a list is empty*@head: the list to test.)
465  Return ret