From: Roman Mamedov <rm@romanrm.net>
To: Christophe de Dinechin <dinechin@redhat.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] Make max_size consistent with nr
Date: Fri, 28 Apr 2017 14:16:40 +0500 [thread overview]
Message-ID: <20170428141640.12429352@natsu> (raw)
In-Reply-To: <004EF35C-BB29-4B53-8BEC-B0DB38F0A301@redhat.com>
On Fri, 28 Apr 2017 11:13:36 +0200
Christophe de Dinechin <dinechin@redhat.com> wrote:
> Since we memset tmpl, max_size==0. This does not seem consistent with nr = 1.
> In check_extent_refs, we will call:
>
> set_extent_dirty(root->fs_info->excluded_extents,
> rec->start,
> rec->start + rec->max_size - 1);
>
> This ends up with BUG_ON(end < start) in insert_state.
>
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> ---
> cmds-check.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/cmds-check.c b/cmds-check.c
> index 58e65d6..774e9b6 100644
> --- a/cmds-check.c
> +++ b/cmds-check.c
> @@ -6193,6 +6193,7 @@ static int add_tree_backref(struct cache_tree *extent_cache, u64 bytenr,
> tmpl.start = bytenr;
> tmpl.nr = 1;
> tmpl.metadata = 1;
> + tmpl.max_size = 1;
>
> ret = add_extent_rec_nolookup(extent_cache, &tmpl);
> if (ret)
The original code uses Tab characters for indent, but your addition uses
spaces. Also same problem in patch 2/3.
--
With respect,
Roman
next prev parent reply other threads:[~2017-04-28 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 9:13 [PATCH 3/3] Make max_size consistent with nr Christophe de Dinechin
2017-04-28 9:16 ` Roman Mamedov [this message]
2017-04-28 9:50 ` [PATCH 2/3 v2] Prevent attempt to insert extent record with max_size==0 Christophe de Dinechin
2017-05-02 16:46 ` David Sterba
2017-04-28 9:51 ` [PATCH 3/3 v2] Make max_size consistent with nr Christophe de Dinechin
2017-05-02 16:53 ` 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=20170428141640.12429352@natsu \
--to=rm@romanrm.net \
--cc=dinechin@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
/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).