Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pagecache_isize_extended - update pagecache after extension of i_size*@inode: inode for which i_size was extended*@from: original inode size*@to: new inode size* Handle extension of inode size either caused by extending truncate or by

Proto:void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)

Type:void

Parameter:

TypeParameterName
struct inode *inode
loff_tfrom
loff_tto
867  bsize = i_blocksize(inode)
872  WARN_ON(to > i_size)
874  If from >= to || bsize == PAGE_SIZE Then Return
877  rounded_from = 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.(from, bsize)
878  If to <= rounded_from || Not (rounded_from & PAGE_SIZE - 1 ) Then Return
881  index = from >> PAGE_SHIFT determines the page size
882  page = locate, pin and lock a pagecache page
884  If Not page Then Return
890  If Cleans the PTEs of shared mappings.* (and since clean PTEs should also be readonly, write protects them too)* returns the number of cleaned PTEs. Then Dirty a page
892  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.
893  put_page(page)
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
iomap_write_end