From: "Yan, Zheng " <yanzheng@21cn.com>
To: liubo <liubo2009@cn.fujitsu.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>,
Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Subject: Re: [PATCH] Btrfs: check root_key's offset instead
Date: Wed, 8 Jun 2011 18:24:57 +0800 [thread overview]
Message-ID: <BANLkTik83m9d1m-_R9fGuidcR2Ygx4Z_gw@mail.gmail.com> (raw)
In-Reply-To: <4DEF44E5.6020906@cn.fujitsu.com>
On Wed, Jun 8, 2011 at 5:46 PM, liubo <liubo2009@cn.fujitsu.com> wrote:
> When we use reloc root to cow or copy a tree block, we do not set the=
block's
> owner, instead we set its header's flag with BTRFS_HEADER_FLAG_RELOC.
>
> So here we should check for root_key's offset.
>
> Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
> ---
> =A0fs/btrfs/extent-tree.c | =A0 =A02 +-
> =A01 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 5b9b6b6..0bda273 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -6160,7 +6160,7 @@ static noinline int walk_up_proc(struct btrfs_t=
rans_handle *trans,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (wc->flags[level + 1] & BTRFS_BLOCK=
_FLAG_FULL_BACKREF)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0parent =3D path->nodes=
[level + 1]->start;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 BUG_ON(root->root_key.o=
bjectid !=3D
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 BUG_ON(root->root_key.o=
ffset !=3D
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 btrfs_hea=
der_owner(path->nodes[level + 1]));
> =A0 =A0 =A0 =A0}
>
This is wrong, all blocks with BTRFS_HEADER_FLAG_RELOC flag set should
uss full back references.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-06-08 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 9:46 [PATCH] Btrfs: check root_key's offset instead liubo
2011-06-08 10:24 ` Yan, Zheng [this message]
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=BANLkTik83m9d1m-_R9fGuidcR2Ygx4Z_gw@mail.gmail.com \
--to=yanzheng@21cn.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=liubo2009@cn.fujitsu.com \
--cc=t-itoh@jp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).