函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\buffered-io.c Create Date:2022-07-29 11:07:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:iomap_write_end

函数原型:static int iomap_write_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page, struct iomap *iomap, struct iomap *srcmap)

返回类型:int

参数:

类型参数名称
struct inode *inode
loff_tpos
unsignedlen
unsignedcopied
struct page *page
struct iomap *iomap
struct iomap *srcmap
763  page_ops等于page_ops
764  old_size等于i_size
767  如果 type of mapping 恒等于data inline in the inode
768  ret等于iomap_write_end_inline(inode, page, iomap, pos, copied)
769  否则如果 flags for mapping 按位与IOMAP_F_BUFFER_HEAD
770  ret等于block_write_end(NULL, i_mapping, pos, len, copied, page, NULL)
772  否则
773  ret等于__iomap_write_end(inode, pos, len, copied, page)
781  如果posret大于old_size
782  NOTE: unlike i_size_read(), i_size_write() does need locking around it* (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount* can be lost, resulting in subsequent i_size_read() calls spinning forever.
783  flags for mapping 或等于Flags set by the core iomap code during operations:* IOMAP_F_SIZE_CHANGED indicates to the iomap_end method that the file size* has changed as the result of this write operation.
785  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.
787  如果old_size小于pospagecache_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
789  如果page_opspage_donepage_done(inode, pos, ret, page, iomap)
791  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
793  如果ret小于leniomap_write_failed(inode, pos, len)
795  返回:ret
调用者
名称描述
iomap_write_actor
iomap_unshare_actor
iomap_zero