函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\truncate.c Create Date:2022-07-27 15:38:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)

返回类型:void

参数:

类型参数名称
struct inode *inode
loff_tfrom
loff_tto
867  bsize等于i_blocksize(inode)
872  WARN_ON(to > i_size)
874  如果from大于等于tobsize恒等于PAGE_SIZE则返回
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  如果to小于等于rounded_from或非rounded_from按位与PAGE_SIZE减1的值则返回
881  index等于from右移PAGE_SHIFT determines the page size
882  page等于d_lock_page - locate, pin and lock a pagecache page*@mapping: the address_space to search*@offset: the page index* Looks up the page cache slot at @mapping & @offset. If there is a* page cache page, it is returned locked and with an increased* refcount.
884  如果非page则返回
890  如果Cleans the PTEs of shared mappings.* (and since clean PTEs should also be readonly, write protects them too)* returns the number of cleaned PTEs.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)
调用者
名称描述
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
generic_write_end