public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Liu Bo <obuil.liubo@gmail.com>
Cc: David Sterba <dsterba@suse.cz>, Liu Bo <bo.liu@linux.alibaba.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] Btrfs: set keep_lock when necessary in btrfs_defrag_leaves
Date: Tue, 1 May 2018 15:39:33 +0200	[thread overview]
Message-ID: <20180501133933.GR21272@twin.jikos.cz> (raw)
In-Reply-To: <CANQeFDCWvuU06eN-TR1VPKDKHYDSHr_2TDRjhczHiPfc_skRuw@mail.gmail.com>

On Fri, Apr 27, 2018 at 01:36:35PM +0800, Liu Bo wrote:
> > What does btrfs_search_forward do as the first statement:
> >
> > 5115 int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
> > 5116                          struct btrfs_path *path,
> > 5117                          u64 min_trans)
> > 5118 {
> > .... declarations
> > 5128
> > 5129         path->keep_locks = 1;
> >
> > So even if removed from above, there will be no change. The value of
> > keep_locks is preserved after btrfs_path_release.
> >
> 
> FYI, btrfs_search_forward() doesn't need keep_locks's semantics as all
> of its callers only access path->nodes[0], thus I'm planning to remove
> keep_locks setting inside it, too.

Ok.

Please update the changelog of this patch and note something about
btrfs_search_forward that sets the path lock on it's own and that
there's no change in defrag leaves.

      reply	other threads:[~2018-05-01 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  1:27 [PATCH v2] Btrfs: set keep_lock when necessary in btrfs_defrag_leaves Liu Bo
2018-04-26  4:57 ` Nikolay Borisov
2018-04-26 18:06 ` David Sterba
2018-04-27  3:23   ` Liu Bo
2018-04-27 10:55     ` David Sterba
2018-04-27  5:36   ` Liu Bo
2018-05-01 13:39     ` David Sterba [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=20180501133933.GR21272@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=bo.liu@linux.alibaba.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=obuil.liubo@gmail.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