Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lock_is_partially_uptodate checks whether buffers within a page are* uptodate or not.* Returns true if all buffers which correspond to a file portion* we want to read are uptodate.

Proto:int block_is_partially_uptodate(struct page *page, unsigned long from, unsigned long count)

Type:int

Parameter:

TypeParameterName
struct page *page
unsigned longfrom
unsigned longcount
2217  ret = 1
2219  If Not page_has_buffers(page) Then Return 0
2222  head = If we *know* page->private refers to buffer_heads (page)
2223  blocksize = size of mapping
2224  to = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsigned, PAGE_SIZE - from, count)
2225  to = from + to
2226  If from < blocksize && to > PAGE_SIZE - blocksize Then Return 0
2229  bh = head
2230  block_start = 0
2231  Do
2232  block_end = block_start + blocksize
2233  If block_end > from && block_start < to Then
2235  ret = 0
2236  Break
2238  If block_end >= to Then Break
2241  block_start = block_end
2242  bh = circular list of page's buffers
2243  When bh != head cycle
2245  Return ret