函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:scrypt_encrypt_pagecache_blocks() - Encrypt filesystem blocks from a pagecache page*@page: The locked pagecache page containing the block(s) to encrypt*@len: Total size of the block(s) to encrypt. Must be a nonzero* multiple of the filesystem's block size.

函数原型:struct page *fscrypt_encrypt_pagecache_blocks(struct page *page, unsigned int len, unsigned int offs, gfp_t gfp_flags)

返回类型:struct page

参数:

类型参数名称
struct page *page
unsigned intlen
unsigned intoffs
gfp_tgfp_flags
161  inode等于host
162  blockbits等于i_blkbits
163  blocksize等于1左移blockbits
165  lblk_num等于 Our offset within mapping. 左移PAGE_SHIFT determines the page size blockbits位的值加offs右移blockbits位的值
170  如果WARN_ON_ONCE(!PageLocked(page))则返回:错误号
173  如果WARN_ON_ONCE(len <= 0 || !IS_ALIGNED(len | offs, blocksize))则返回:错误号
176  ciphertext_page等于fscrypt_alloc_bounce_page(gfp_flags)
177  如果非ciphertext_page则返回:错误号
180 i小于offslen循环
181  err等于Encrypt or decrypt a single filesystem block of file contents
184  如果err
186  返回:错误号
189  Private page markings that may be used by the filesystem that owns the page* for its own purposes.* - PG_private and PG_private_2 cause releasepage() and co to be invoked
190  set_page_private(ciphertext_page, (unsignedlong)page)
191  返回:ciphertext_page