linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: jeffm@suse.com
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: remove root usage from can_overcommit
Date: Thu, 18 May 2017 17:02:33 -0700	[thread overview]
Message-ID: <20170519000233.GF23822@lim.localdomain> (raw)
In-Reply-To: <1495035516-3217-3-git-send-email-jeffm@suse.com>

On Wed, May 17, 2017 at 11:38:36AM -0400, jeffm@suse.com wrote:
> From: Jeff Mahoney <jeffm@suse.com>
> 
> can_overcommit using the root to determine the allocation profile
> is the only use of a root in the call graph below reserve_metadata_bytes.
> 
> It turns out that we only need to know whether the allocation is for
> the chunk root or not -- and we can pass that around as a bool instead.
> 
> This allows us to pull root usage out of the reservation path all the
> way up to reserve_metadata_bytes itself, which uses it only to compare
> against fs_info->chunk_root to set the bool.  In turn, this eliminates
> a bunch of races where we use a particular root too early in the mount
> process.
> 
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

Thanks,

-liubo

  reply	other threads:[~2017-05-19  0:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 15:38 [PATCH 1/3] btrfs: fix race with relocation recovery and fs_root setup jeffm
2017-05-17 15:38 ` [PATCH 2/3] btrfs: cleanup root usage by btrfs_get_alloc_profile jeffm
2017-05-19  0:02   ` Liu Bo
2017-05-17 15:38 ` [PATCH 3/3] btrfs: remove root usage from can_overcommit jeffm
2017-05-19  0:02   ` Liu Bo [this message]
2017-05-18 23:58 ` [PATCH 1/3] btrfs: fix race with relocation recovery and fs_root setup Liu Bo
2017-05-19 18:10   ` 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=20170519000233.GF23822@lim.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=jeffm@suse.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).