linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Filipe David Manana <fdmanana@gmail.com>
To: "Holger Hoffstätte" <holger.hoffstaette@googlemail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: fix racy system chunk allocation when setting block group ro
Date: Tue, 19 May 2015 13:30:19 +0100	[thread overview]
Message-ID: <CAL3q7H6ay7T_-RK+ujf0KM4eLbMfAhOXHWV1Fr5G_Msd5Mxr1g@mail.gmail.com> (raw)
In-Reply-To: <pan.2015.05.19.11.32.06@googlemail.com>

On Tue, May 19, 2015 at 12:32 PM, Holger Hoffstätte
<holger.hoffstaette@googlemail.com> wrote:
> On Mon, 18 May 2015 19:11:40 +0100, Filipe Manana wrote:
>
>> If while setting a block group read-only we end up allocating a system
>> chunk, through check_system_chunk(), we were not doing it while holding
>> the chunk mutex which is a problem if a concurrent chunk allocation is
>> happening, through do_chunk_alloc(), as it means both block groups can
>> end up using the same logical addresses and physical regions in the
>> device(s). So make sure we hold the chunk mutex.
>>
>> Cc: stable@vger.kernel.org  # 4.0+
>> Fixes: 2f0810880f08 ("btrfs: delete chunk allocation attemp when
>>                       setting block group ro")
>
> Hello Filipe,
>
> good find, as usual. But from the description it's not clear to me whether
> this also fixes rebalance seemingly not having an effect (as reported many
> times now) or "just" the on-disk block data getting munched together on a
> racy day? Just thought I'd ask for clarification before I start patching.

No, it doesn't fix the balance/conversion issue. It's a completely
separate issue/regression. Chris is working on the balance/conversion
issue.

thanks

>
> Thanks!
>
> Holger
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

      reply	other threads:[~2015-05-19 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 18:11 [PATCH] Btrfs: fix racy system chunk allocation when setting block group ro Filipe Manana
2015-05-19 11:32 ` Holger Hoffstätte
2015-05-19 12:30   ` Filipe David Manana [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=CAL3q7H6ay7T_-RK+ujf0KM4eLbMfAhOXHWV1Fr5G_Msd5Mxr1g@mail.gmail.com \
    --to=fdmanana@gmail.com \
    --cc=holger.hoffstaette@googlemail.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).