函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\buffered-io.c Create Date:2022-07-29 11:07:19
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, int flags, struct page *page, struct iomap *srcmap)

返回类型:int

参数:

类型参数名称
struct inode *inode
loff_tpos
unsignedlen
intflags
struct page *page
struct iomap *srcmap
602  iop等于iomap_page_create(inode, page)
603  block_size等于i_blocksize(inode)
604  block_start等于pos按位与block_size减1的差的反
605  block_end等于poslenblock_size减1按位与block_size减1的差的反
606  from等于offset_in_page(pos), to等于from加len
609  如果PageUptodate(page)则返回:0
612  循环
613  Calculate the range inside the page that we actually need to read.
615  如果plen恒等于0则退出
618  如果非flags按位与IOMAP_WRITE_F_UNSHARE的值且from小于等于pofffrom大于等于poffplen的值且to小于等于poffto大于等于poffplen的值则继续下一循环
624  如果WARN_ON_ONCE(flags & IOMAP_WRITE_F_UNSHARE)则返回:负EIO
628  继续下一循环
631  status等于iomap_read_page_sync(block_start, page, poff, plen, srcmap)
633  如果status则返回:status
635 block_start加等于plen的和小于block_end循环
637  返回:0
调用者
名称描述
iomap_write_begin