From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH][RESEND] btrfs: kill update_block_group_flags
Date: Mon, 2 Mar 2020 16:02:06 +0100 [thread overview]
Message-ID: <5dab8982-1e6f-a840-9d2b-cf8e1626cf1f@applied-asynchrony.com> (raw)
In-Reply-To: <20200302141042.by7jjjokwttqfyzn@jbacik-mbp>
On 3/2/20 3:10 PM, Josef Bacik wrote:
> On Sun, Mar 01, 2020 at 06:58:02PM +0100, Holger Hoffstätte wrote:
>> On 1/17/20 3:08 PM, Josef Bacik wrote:
>>> btrfs/061 has been failing consistently for me recently with a
>>> transaction abort. We run out of space in the system chunk array, which
>>> means we've allocated way too many system chunks than we need.
[snip]
>> It seems that this patch breaks forced metadata rebalance from dup to single;
>> all chunks remain dup (or are rewritten as dup again). I bisected the broken
>> balance behaviour to this commit which for some reason was in my tree ;-) and
>> reverting it immediately fixed things.
>>
>> I don't (yet) see this applied anywhere, but couldn't find any discussion or
>> revocation either. Maybe the logic between update_block_group_flags() and
>> btrfs_get_alloc_profile() is not completely exchangeable?
>>
>
> Well cool, it looks like we just ignore the restriping stuff if it's not what we
> already have available, which is silly considering we probably don't have any
> block groups of the stripe that we had before. The previous helpers just
> unconditionally used the restripe target, so can you apply this patch ontop of
> this one and see if it starts working? I'll wire up a xfstest for this so we
> don't miss it again. Thanks,
>
> Josef
>
> From 01ec038b8fa64c2bbec6d117860e119a49c01f60 Mon Sep 17 00:00:00 2001
> From: Josef Bacik <josef@toxicpanda.com>
> Date: Mon, 2 Mar 2020 09:08:33 -0500
> Subject: [PATCH] we're restriping, use the target
>
> ---
> fs/btrfs/block-group.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
> index 60e9bb136f34..becad9c7486b 100644
> --- a/fs/btrfs/block-group.c
> +++ b/fs/btrfs/block-group.c
> @@ -66,11 +66,8 @@ static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags)
> spin_lock(&fs_info->balance_lock);
> target = get_restripe_target(fs_info, flags);
> if (target) {
> - /* Pick target profile only if it's already available */
> - if ((flags & target) & BTRFS_EXTENDED_PROFILE_MASK) {
> - spin_unlock(&fs_info->balance_lock);
> - return extended_to_chunk(target);
> - }
> + spin_unlock(&fs_info->balance_lock);
> + return extended_to_chunk(target);
> }
> spin_unlock(&fs_info->balance_lock);
>
>
Applied it on top & it makes dup -> single balancing work again. \o/
Feel free to add my Tested-by.
Thanks!
Holger
next prev parent reply other threads:[~2020-03-02 15:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 14:08 [PATCH][RESEND] btrfs: kill update_block_group_flags Josef Bacik
2020-03-01 17:58 ` Holger Hoffstätte
2020-03-02 14:10 ` Josef Bacik
2020-03-02 15:02 ` Holger Hoffstätte [this message]
2020-03-02 20:18 ` David Sterba
2020-06-30 9:22 ` Holger Hoffstätte
2020-06-30 13:35 ` Josef Bacik
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=5dab8982-1e6f-a840-9d2b-cf8e1626cf1f@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.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