Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:runcate_pagecache - unmap and remove pagecache that has been truncated*@inode: inode*@newsize: new file size* inode's new i_size must already be written before truncate_pagecache* is called.* This function should typically be called before the filesystem

Proto:void truncate_pagecache(struct inode *inode, loff_t newsize)

Type:void

Parameter:

TypeParameterName
struct inode *inode
loff_tnewsize
804  mapping = i_mapping
805  holebegin = und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(newsize, PAGE_SIZE)
816  unmap_mapping_range(mapping, holebegin, 0, 1)
817  runcate_inode_pages - truncate *all* the pages from an offset*@mapping: mapping to truncate*@lstart: offset from which to truncate* Called under (and serialised by) inode->i_mutex.* Note: When this function returns, there can be a page in the process of
818  unmap_mapping_range(mapping, holebegin, 0, 1)
Caller
NameDescribe
truncate_setsizeruncate_setsize - update inode and pagecache for a new file size*@inode: inode*@newsize: new file size* truncate_setsize updates i_size and performs pagecache truncation (if* necessary) to @newsize. It will be typically be called from the filesystem's