函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fscrypt_zeroout_range

函数原型:int fscrypt_zeroout_range(const struct inode *inode, unsigned long lblk, sector_t pblk, unsigned int len)

返回类型:int

参数:

类型参数名称
const struct inode *inode
unsigned longlblk
sector_tpblk
unsigned intlen
47  blockbits等于i_blkbits
48  blocksize等于1左移blockbits
51  err等于0
53  ciphertext_page等于fscrypt_alloc_bounce_page(GFP_NOWAIT)
54  如果非ciphertext_page则返回:负ENOMEM
57 len自减循环
58  err等于Encrypt or decrypt a single filesystem block of file contents
61  如果err则转到:errout
64  bio等于bio_alloc(GFP_NOWAIT, 1)
65  如果非bio
66  err等于负ENOMEM
67  转到:errout
69  bio_set_dev(bio, s_bdev)
70  device address in 512 byte sectors 等于pblk左移blockbits减9位
71  bsolete, don't use in new code
72  ret等于bio_add_page(bio, ciphertext_page, blocksize, 0)
73  如果WARN_ON(ret != blocksize)则
75  bio_put(bio)
76  err等于负EIO
77  转到:errout
79  err等于submit_bio_wait(bio)
80  如果err恒等于0且bi_statuserr等于负EIO
82  bio_put(bio)
83  如果err则转到:errout
85  lblk自加
86  pblk自加
88  err等于0
89  errout :
90  scrypt_free_bounce_page() - free a ciphertext bounce page* Free a bounce page that was allocated by fscrypt_encrypt_pagecache_blocks(),* or by fscrypt_alloc_bounce_page() directly.
91  返回:err