public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: tree-checker: Make write time tree checker verify the content of leaves
Date: Wed, 3 Apr 2019 17:12:48 +0300	[thread overview]
Message-ID: <0a3ba25a-10b5-794d-6db2-0cf9b27c83d8@suse.com> (raw)
In-Reply-To: <20190403115919.17049-1-wqu@suse.com>



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@suse.com>

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@suse.com>

> ---
>  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)
> 

  parent reply	other threads:[~2019-04-03 14:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 11:59 [PATCH 1/2] btrfs: tree-checker: Make write time tree checker verify the content of leaves Qu Wenruo
2019-04-03 11:59 ` [PATCH 2/2] btrfs: tree-checker: Remove comprehensive root owner check Qu Wenruo
2019-04-03 14:21   ` David Sterba
2019-04-03 14:26     ` Qu Wenruo
2019-04-03 15:00       ` David Sterba
2019-04-03 14:22   ` Nikolay Borisov
2019-04-03 14:12 ` Nikolay Borisov [this message]
2019-04-03 14:20   ` [PATCH 1/2] btrfs: tree-checker: Make write time tree checker verify the content of leaves Qu Wenruo
2019-04-03 14:13 ` David Sterba
2019-04-03 14:15   ` Qu Wenruo
2019-04-03 14:25     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a3ba25a-10b5-794d-6db2-0cf9b27c83d8@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox