All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>, <linux-btrfs@vger.kernel.org>
Cc: <dsterba@suse.cz>, Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Subject: Re: [PATCH RFC 03/16] btrfs-progs: fsck: Introduce function to query tree block level
Date: Fri, 29 Apr 2016 09:51:27 -0400	[thread overview]
Message-ID: <0c545634-a7b3-5845-09c0-43bd8280ce07@fb.com> (raw)
In-Reply-To: <e197cac6-fc53-c007-28c0-facfe65e3754@cn.fujitsu.com>

On 04/28/2016 11:35 PM, Qu Wenruo wrote:
>
>
> Josef Bacik wrote on 2016/04/28 10:13 -0400:
>> On 04/25/2016 11:48 PM, Qu Wenruo wrote:
>>> From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
>>>
>>> Introduce function query_tree_block_level() to resolve tree block level
>>> by reading out the tree block.
>>>
>>> Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
>>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>>> ---
>>
>> This skips the check_tree_block if the transid passes, but we could have
>> a matching transid but a corrupt item.  You need to fix
>> read_tree_block_fs_info to always call check_block so we can be sure
>> that our btrfs_header_level() is valid here.  Thanks,
>>
>> Josef
>>
>>
> read_tree_block_fs_info(or read_tree_block) will call check_tree_block()
> and verify_parent_transid() if it doesn't find a cached extent buffer.
>
> So I don't think we need to do further modification to
> read_tree_block_fs_info().
>
> But your comment reminds me that, we did miss the generation check, as
> we can get generation from backref, and when we can, we should also
> check transid.
>
> We will add transid check from metadata backref.
>

Sigh I was looking at an older version of btrfs-progs, you are right. 
Thanks,

Josef


  reply	other threads:[~2016-04-29 13:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  3:48 [PATCH RFC 00/16] Introduce low memory usage btrfsck mode Qu Wenruo
2016-04-26  3:48 ` [PATCH RFC 01/16] btrfs-progs: fsck: Introduce function to check tree block backref in extent tree Qu Wenruo
2016-04-28 14:03   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 02/16] btrfs-progs: fsck: Introduce function to check data " Qu Wenruo
2016-04-28  1:43   ` [PATCH RFC v1.1 " Qu Wenruo
2016-04-28 14:08     ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 03/16] btrfs-progs: fsck: Introduce function to query tree block level Qu Wenruo
2016-04-28 14:13   ` Josef Bacik
2016-04-29  3:35     ` Qu Wenruo
2016-04-29 13:51       ` Josef Bacik [this message]
2016-04-26  3:48 ` [PATCH RFC 04/16] btrfs-progs: fsck: Introduce function to check referencer of a backref Qu Wenruo
2016-04-28 14:17   ` Josef Bacik
2016-04-29  5:31     ` Qu Wenruo
2016-04-29 13:52       ` Josef Bacik
2016-05-03  0:56         ` Qu Wenruo
2016-04-28 14:31   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 05/16] btrfs-progs: fsck: Introduce function to check shared block ref Qu Wenruo
2016-04-28 14:19   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 06/16] btrfs-progs: fsck: Introduce function to check referencer for data backref Qu Wenruo
2016-04-28 14:22   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 07/16] btrfs-progs: fsck: Introduce function to check shared " Qu Wenruo
2016-04-28 14:23   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 08/16] btrfs-progs: fsck: Introduce function to check an extent Qu Wenruo
2016-04-28 14:26   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 09/16] btrfs-progs: fsck: Introduce function to check dev extent item Qu Wenruo
2016-04-28 14:27   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 10/16] btrfs-progs: fsck: Introduce function to check dev used space Qu Wenruo
2016-04-28 14:29   ` Josef Bacik
2016-04-26  3:48 ` [PATCH RFC 11/16] btrfs-progs: fsck: Introduce function to check block group item Qu Wenruo
2016-04-26  3:48 ` [PATCH RFC 12/16] btrfs-progs: fsck: Introduce function to check chunk item Qu Wenruo
2016-04-26  3:49 ` [PATCH RFC 13/16] btrfs-progs: fsck: Introduce hub function for later fsck Qu Wenruo
2016-04-26  3:49 ` [PATCH RFC 14/16] btrfs-progs: fsck: Introduce function to speed up fs tree check Qu Wenruo
2016-04-26  3:49 ` [PATCH RFC 15/16] btrfs-progs: fsck: Introduce traversal function for fsck Qu Wenruo
2016-04-26  3:49 ` [PATCH RFC 16/16] btrfs-progs: fsck: Introduce low memory mode Qu Wenruo
2016-04-26 13:38 ` [PATCH RFC 00/16] Introduce low memory usage btrfsck mode Austin S. Hemmelgarn
2016-04-28 14:32 ` Josef Bacik
2016-04-29  0:25   ` Qu Wenruo

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=0c545634-a7b3-5845-09c0-43bd8280ce07@fb.com \
    --to=jbacik@fb.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lufq.fnst@cn.fujitsu.com \
    --cc=quwenruo@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.