函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iomap_write_begin

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

返回类型:int

参数:

类型参数名称
struct inode *inode
loff_tpos
unsignedlen
unsignedflags
struct page **pagep
struct iomap *iomap
struct iomap *srcmap
644  page_ops等于page_ops
646  status等于0
648  BUG_ON(pos + len > file offset of mapping, bytes + length of mapping, bytes )
649  如果srcmap不等于iomapBUG_ON(pos + len > file offset of mapping, bytes + length of mapping, bytes )
652  如果fatal_signal_pending(当前进程)则返回:负EINTR
655  如果page_opspage_prepare
656  status等于page_prepare(inode, pos, len, iomap)
657  如果status则返回:status
661  page等于Find or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes.
663  如果非page
664  status等于负ENOMEM
665  转到:out_no_page
668  如果 type of mapping 恒等于data inline in the inode iomap_read_inline_data(inode, page, srcmap)
670  否则如果 flags for mapping 按位与IOMAP_F_BUFFER_HEADstatus等于__block_write_begin_int(page, pos, len, NULL, srcmap)
672  否则status等于__iomap_write_begin(inode, pos, len, flags, page, srcmap)
676  如果此条件成立可能性小(为编译器优化)(status)则转到:out_unlock
679  pagep等于page
680  返回:0
682  out_unlock :
683  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.
684  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
685  iomap_write_failed(inode, pos, len)
687  out_no_page :
688  如果page_opspage_donepage_done(inode, pos, 0, NULL, iomap)
690  返回:status
调用者
名称描述
iomap_write_actor
iomap_unshare_actor
iomap_zero