All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: "misono.tomohiro@fujitsu.com" <misono.tomohiro@fujitsu.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH 1/3] btrfs-progs: check: lowmem: Factor out inline extent checking code in its own function
Date: Wed, 31 Oct 2018 18:19:16 +0100	[thread overview]
Message-ID: <20181031171916.GJ9136@twin.jikos.cz> (raw)
In-Reply-To: <7bc87724-9d43-e487-140b-fc184cd83873@suse.com>

On Wed, Oct 31, 2018 at 11:43:20AM +0200, Nikolay Borisov wrote:
> >> --- a/check/mode-lowmem.c
> >> +++ b/check/mode-lowmem.c
> >> @@ -1800,6 +1800,87 @@ static int repair_inline_ram_bytes(struct btrfs_root *root,
> >>  	return ret;
> >>  }
> >>  
> >> +
> >> +static int check_file_extent_inline(struct btrfs_root *root,
> >> +				    struct btrfs_path *path, u64 *size,
> >> +				    u64 *end)
> >> +{
> >> +	u32 max_inline_extent_size = min_t(u32, root->fs_info->sectorsize - 1,
> >> +				BTRFS_MAX_INLINE_DATA_SIZE(root->fs_info));
> >> +	struct extent_buffer *node = path->nodes[0];
> >> +	struct btrfs_item *e = btrfs_item_nr(0);
> >                                btrfs_item_nr(path->slots[0])
> > 
> > I think this fixes the problem.
> 
> Indeed, the original code uses path->slots[0] as the slot whereas I've
> fixed that at slow 0, which of course is not always going to be the case.
> 
> David will you fold this in the original patch ?

Yes I'll fold it. Thanks.

  reply	other threads:[~2018-10-31 17:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 12:05 [PATCH 0/3] Misc refactoring of check_file_extent Nikolay Borisov
2018-09-13 12:05 ` [PATCH 1/3] btrfs-progs: check: lowmem: Factor out inline extent checking code in its own function Nikolay Borisov
2018-09-13 23:05   ` Qu Wenruo
2018-10-31  9:35   ` misono.tomohiro
2018-10-31  9:43     ` Nikolay Borisov
2018-10-31 17:19       ` David Sterba [this message]
2018-10-31  9:40   ` misono.tomohiro
2018-09-13 12:05 ` [PATCH 2/3] btrfs-progs: check: lowmem: Refactor extent len test in check_file_extent_inline Nikolay Borisov
2018-09-13 23:07   ` Qu Wenruo
2018-09-13 12:05 ` [PATCH 3/3] btrfs-progs: check: lowmem: Refactor extent type checks in check_file_extent Nikolay Borisov
2018-09-13 23:08   ` Qu Wenruo
2018-09-13 12:23 ` [PATCH 0/3] Misc refactoring of check_file_extent Lu Fengqi
2018-10-24 17:45 ` 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=20181031171916.GJ9136@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=misono.tomohiro@fujitsu.com \
    --cc=nborisov@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 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.