On 3.04.19 г. 14:59 ч., Qu Wenruo wrote:
> Commit "btrfs: Do mandatory tree block check before submitting bio" is
> designed to check leaves contents, just as read time check.
>
> However due to the confusing parameter list, "false" is passed to where
> it is supposed to be "true".
>
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
The subject of the patch could be a bit more precise, by passing true
you are doing further validation of the body of individual items in the
leaves. Alternatively you are sanity checking the keys and the
boundaries of item body. So how about:
"Perform item body validation during write"
Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
> ---
> fs/btrfs/tree-checker.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 4318e3e67443..204fe53c90aa 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -999,7 +999,7 @@ int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info,
> int btrfs_check_leaf_write(struct btrfs_fs_info *fs_info,
> struct extent_buffer *leaf)
> {
> - return check_leaf(leaf, false, false);
> + return check_leaf(leaf, true, false);
> }
>
> int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node)
>