Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Initialise the state of a blockdev page's buffers.

Proto:static sector_t init_page_buffers(struct page *page, struct block_device *bdev, sector_t block, int size)

Type:sector_t

Parameter:

TypeParameterName
struct page *page
struct block_device *bdev
sector_tblock
intsize
937  head = If we *know* page->private refers to buffer_heads (page)
938  bh = head
939  uptodate = PageUptodate(page)
940  end_block = blkdev_max_block(I_BDEV( will die ), size)
942  Do
943  If Not buffer_mapped(bh) Then
944  I/O completion = NULL
946  b_bdev = bdev
950  If block < end_block Then set_buffer_mapped(bh)
953  block++
954  bh = circular list of page's buffers
955  When bh != head cycle
960  Return end_block
Caller
NameDescribe
grow_dev_pageCreate the page-cache page that contains the requested block.* This is used purely for blockdev mappings.