| 函数逻辑报告 | 
| Source Code: fs\verity\enable.c | Create Date:2022-07-29 10:58:12 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Build the Merkle tree for the given inode using the given parameters, and* return the root hash in @root_hash.* The tree is written to a filesystem-specific location as determined by the* ->write_merkle_tree_block() method
函数原型:static int build_merkle_tree(struct inode *inode, const struct merkle_tree_params *params, u8 *root_hash)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct inode * | inode | |
| const struct merkle_tree_params * | params | |
| u8 * | root_hash | 
| 123 | 如果i_size恒等于0则 | 
| 125 | memset(root_hash, 0, same as hash_alg->digest_size ) | 
| 126 | 返回:0 | 
| 129 | pending_hashes等于开辟内存 | 
| 131 | 如果非pending_hashes或非req则转到:out | 
| 139 | blocks等于i_size加size of data and tree blocks 减1右移log2(block_size) 位 | 
| 141 | 以level小于等于umber of levels in Merkle tree 循环 | 
| 142 | err等于build_merkle_tree_level(inode, level, blocks, params, pending_hashes, req) | 
| 150 | err等于0 | 
| 151 | out : | 
| 152 | 释放内存 | 
| 153 | 归零并释放数据结构请求 | 
| 154 | 返回:err | 
| 名称 | 描述 | 
|---|---|
| enable_verity | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |