All of lore.kernel.org
 help / color / mirror / Atom feed
From: james harvey <jamespharvey20@gmail.com>
To: Su Yue <suy.fnst@cn.fujitsu.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH RFC] btrfs-progs: map-logical: look at next leaf if slot > items
Date: Thu, 7 Jun 2018 03:19:39 -0400	[thread overview]
Message-ID: <CA+X5Wn4nhGQDAs-kgGraUpT8R6W6w06Gp2e4QnDvNfHvZZCCjQ@mail.gmail.com> (raw)
In-Reply-To: <d2875ce4-1d61-1298-c7d7-a522ca04d43a@cn.fujitsu.com>

On Thu, Jun 7, 2018 at 12:20 AM, Su Yue <suy.fnst@cn.fujitsu.com> wrote:
> On 06/07/2018 11:33 AM, james harvey wrote:
>> Using btrfs-progs v4.16:
>>
>> No extent found at range [10955980800,10955984896)
>>
>> But, this extent exists.  btrfs-debug-tree shows:
> Make sense. IMP the commit message is too long to read.
> Code wise is almost fine. Some nitpicks are below.

Thanks for response.  I'll try to work on that.

>> +       if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) {
>> +               ret = btrfs_next_leaf(fs_info->extent_root, path);
>> +               if (ret != 0) {
>> +                       ret = -1;
>
> btrfs_next_leaf() may return -EIO, so keep the negative return code is
> prefered.
> btrfs_next_leaf may return > 0, here I'd like to set ret=-ENOENT.
> You can refer callers of btrfs_next_leaf() how to handle the return codes.

Fixed in v2.

>>                 else
>> -                       ret = btrfs_next_item(fs_info->extent_root, path);
>> +                       ret =
> Nit:
> Misclick here?

Missed semicolon being 81st character, fixed in v2.

  parent reply	other threads:[~2018-06-07  7:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07  3:33 [PATCH RFC] btrfs-progs: map-logical: look at next leaf if slot > items james harvey
2018-06-07  4:20 ` Su Yue
2018-06-07  4:46   ` Qu Wenruo
2018-06-07  7:19   ` james harvey [this message]
2018-06-07  4:44 ` Qu Wenruo
     [not found]   ` <CA+X5Wn7ore144+BqMSmntPOGX3c5HiyQtQN_p4+F1+rfhCQSsg@mail.gmail.com>
     [not found]     ` <c10bf62d-8c31-7f1d-809a-c36b39c1930c@gmx.com>
2018-06-07 19:57       ` james harvey
2018-06-08  1:21         ` 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=CA+X5Wn4nhGQDAs-kgGraUpT8R6W6w06Gp2e4QnDvNfHvZZCCjQ@mail.gmail.com \
    --to=jamespharvey20@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=suy.fnst@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.