Function report |
Source Code:fs\verity\enable.c |
Create Date:2022-07-28 20:24:32 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int build_merkle_tree(struct inode *inode, const struct merkle_tree_params *params, u8 *root_hash)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct inode * | inode | |
| const struct merkle_tree_params * | params | |
| u8 * | root_hash |
| 123 | If i_size == 0 Then |
| 125 | memset(root_hash, 0, same as hash_alg->digest_size ) |
| 126 | Return 0 |
| 131 | If Not pending_hashes || Not req Then Go to out |
| 139 | blocks = i_size + size of data and tree blocks - 1 >> log2(block_size) |
| 141 | When level <= umber of levels in Merkle tree cycle |
| 142 | err = build_merkle_tree_level(inode, level, blocks, params, pending_hashes, req) |
| 146 | blocks = blocks + umber of hashes per tree block - 1 >> log2(hashes_per_block) |
| 150 | err = 0 |
| 151 | out : |
| 152 | kfree(pending_hashes) |
| 154 | Return err |
| Name | Describe |
|---|---|
| enable_verity |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |