linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix race between balance recovery and root deletion
Date: Wed, 2 Jul 2014 00:46:08 +0200	[thread overview]
Message-ID: <20140701224608.GS1553@twin.jikos.cz> (raw)
In-Reply-To: <1403752096-4776-1-git-send-email-wangsl.fnst@cn.fujitsu.com>

On Thu, Jun 26, 2014 at 11:08:16AM +0800, Wang Shilong wrote:
> Balance recovery is called when RW mounting or remounting from
> RO to RW, it is called to finish roots merging.
> 
> When doing balance recovery, relocation root's corresponding
> fs root(whose root refs is 0) might be destroyed by cleaner
> thread, this will make btrfs fail to mount.
> 
> Fix this problem by holding @cleaner_mutex when doing balance
> recovery.
> 
> Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>

I don't pretend to understand all the dark corners of relocation, but
this looks as a correct fix to me. Relocation and cleaner are mutually
exclusive in the normal case.

Reviewed-by: David Sterba <dsterba@suse.cz>

      reply	other threads:[~2014-07-01 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  3:08 [PATCH] Btrfs: fix race between balance recovery and root deletion Wang Shilong
2014-07-01 22:46 ` 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=20140701224608.GS1553@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangsl.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 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).