Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\buffered-io.c Create Date:2022-07-28 20:31:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:iomap_write_end

Proto:static int iomap_write_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page, struct iomap *iomap, struct iomap *srcmap)

Type:int

Parameter:

TypeParameterName
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  If type of mapping == data inline in the inode Then
768  ret = iomap_write_end_inline(inode, page, iomap, pos, copied)
769  Else if flags for mapping & IOMAP_F_BUFFER_HEAD Then
770  ret = block_write_end(NULL, i_mapping, pos, len, copied, page, NULL)
772  Else
773  ret = __iomap_write_end(inode, pos, len, copied, page)
781  If pos + ret > old_size Then
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  If old_size < pos Then 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
789  If page_ops && page_done Then page_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  If ret < len Then iomap_write_failed(inode, pos, len)
795  Return ret
Caller
NameDescribe
iomap_write_actor
iomap_unshare_actor
iomap_zero