linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] btrfs: Fix lost-data-profile caused by auto removing bg
Date: Tue, 6 Oct 2015 09:54:03 -0400	[thread overview]
Message-ID: <20151006135403.GY25218@ret.masoncoding.com> (raw)
In-Reply-To: <a2ff95d73e0ccec4703c1f4d0b9af4c1a19fe4e2.1443889301.git.zhaolei@cn.fujitsu.com>


Hi,

On Sun, Oct 04, 2015 at 12:28:39AM +0800, Zhao Lei wrote:
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 79a5bd9..c05b975 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -10010,8 +10010,18 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
>  		block_group = list_first_entry(&fs_info->unused_bgs,
>  					       struct btrfs_block_group_cache,
>  					       bg_list);
> -		space_info = block_group->space_info;
>  		list_del_init(&block_group->bg_list);
> +
> +		space_info = block_group->space_info;
> +
> +		down_read(&space_info->groups_sem);

Thanks for reworking this, are there other patches that I'm missing that
are meant to go in before this one?

The down_read() this patch adds is inside a spinlock().

-chris


  reply	other threads:[~2015-10-06 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 16:28 [PATCH v3 0/2] btrfs: Fix lost-data-profile caused by auto removing bg and balance bg Zhao Lei
2015-10-03 16:28 ` [PATCH v3 1/2] btrfs: Fix lost-data-profile caused by auto removing bg Zhao Lei
2015-10-06 13:54   ` Chris Mason [this message]
2015-10-03 16:28 ` [PATCH v3 2/2] btrfs: Fix lost-data-profile caused by balance bg Zhao Lei

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=20151006135403.GY25218@ret.masoncoding.com \
    --to=clm@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zhaolei@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).