函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-29 10:45:20
Last Modify:2020-03-18 10:38:29 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:For moronic filesystems that do not allow holes in file.* We may have to extend the file.

函数原型:int cont_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata, get_block_t *get_block, loff_t *bytes)

返回类型:int

参数:

类型参数名称
struct file *file
struct address_space *mapping
loff_tpos
unsignedlen
unsignedflags
struct page **pagep
void **fsdata
get_block_t *get_block
loff_t *bytes
2451  inode等于host
2452  blocksize等于i_blocksize(inode)
2456  err等于cont_expand_zero(file, mapping, pos, bytes)
2457  如果err则返回:err
2460  zerofrom等于bytes按位与PAGE_MASK的反
2461  如果poslen大于byteszerofrom按位与blocksize减1则
2462  bytes或等于blocksize减1
2463  bytes自加
2466  返回:lock_write_begin takes care of the basic task of block allocation and* bringing partial write blocks uptodate first.* The filesystem needs to handle block truncation upon failure.