函数逻辑报告 |
Source Code:fs\iomap\direct-io.c |
Create Date:2022-07-29 11:07:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:iomap_dio_bio_actor
函数原型:static loff_t iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, struct iomap_dio *dio, struct iomap *iomap)
返回类型:loff_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct inode * | inode | |
loff_t | pos | |
loff_t | length | |
struct iomap_dio * | dio | |
struct iomap * | iomap |
202 | fs_block_size等于i_blocksize(inode) |
203 | align等于iov_iter_alignment(iter) |
205 | bool need_zeroout = false |
206 | bool use_fua = false |
207 | ret等于0 |
208 | copied等于0 |
216 | need_zeroout = true |
219 | 如果 flags for mapping 按位与IOMAP_F_SHARED则flags或等于covers COW extent(s) |
223 | need_zeroout = true |
224 | 否则如果 type of mapping 恒等于locks allocated at @addr 则 |
243 | orig_count等于iov_iter_count(iter) |
246 | nr_pages等于iov_iter_npages(iter, BIO_MAX_PAGES) |
247 | 如果nr_pages小于等于0则 |
252 | 如果need_zeroout则 |
254 | pad等于pos按位与fs_block_size减1 |
259 | 循环 |
261 | 如果error则 |
267 | bio等于bio_alloc(GFP_KERNEL, nr_pages) |
268 | bio_set_dev(bio, block device for I/O ) |
270 | bi_write_hint等于ki_hint |
271 | bi_ioprio等于 See linux/ioprio.h |
272 | bi_private等于dio |
275 | ret等于bio_iov_iter_get_pages(bio, iter) |
276 | 如果此条件成立可能性小(为编译器优化)(ret)则 |
287 | n等于 residual I/O count |
288 | 如果flags按位与IOMAP_DIO_WRITE则 |
294 | task_io_account_write(n) |
295 | 否则 |
297 | 如果flags按位与IOMAP_DIO_DIRTY则bio_set_pages_dirty(bio) |
305 | nr_pages等于iov_iter_npages(iter, BIO_MAX_PAGES) |
306 | iomap_dio_submit_bio(dio, iomap, bio) |
315 | zero_tail : |
319 | pad等于pos按位与fs_block_size减1 |
320 | 如果pad则iomap_dio_zero(dio, iomap, pos, fs_block_size - pad) |
323 | out : |
328 | 返回:ret |
名称 | 描述 |
---|---|
iomap_dio_actor |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |