All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Bo <bo.liu@linux.alibaba.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: remove level==0 check in balance_level
Date: Wed, 12 Sep 2018 12:30:18 -0700	[thread overview]
Message-ID: <20180912193017.pnuqtnhhc6e6x4ld@US-160370MP2.local> (raw)
In-Reply-To: <20180912125238.GM2154@twin.jikos.cz>

On Wed, Sep 12, 2018 at 02:52:38PM +0200, David Sterba wrote:
> On Wed, Sep 12, 2018 at 06:06:23AM +0800, Liu Bo wrote:
> > btrfs_search_slot()
> >    if (level != 0)
> >       setup_nodes_for_search()
> >           balance_level()
> > 
> > It is just impossible to have level=0 in balance_level.
> 
> While this is true, what do you think about adding ASSERT(level > 0) ?
> This is to catch accidentally passing level 0.

Sounds good, will update it.

thanks,
-liubo

  reply	other threads:[~2018-09-13  0:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 22:06 [PATCH] Btrfs: remove level==0 check in balance_level Liu Bo
2018-09-12  6:42 ` Nikolay Borisov
2018-09-12 12:52 ` David Sterba
2018-09-12 19:30   ` Liu Bo [this message]
2018-09-13 17:55 ` [PATCH v2] " Liu Bo
2018-09-14 12:49   ` 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=20180912193017.pnuqtnhhc6e6x4ld@US-160370MP2.local \
    --to=bo.liu@linux.alibaba.com \
    --cc=dsterba@suse.cz \
    --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 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.