All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Cc: josef@toxicpanda.com
Subject: Re: [PATCH RFC] btrfs: no need to transition to rdonly for ENOSPC error
Date: Tue, 12 Jan 2021 21:39:58 +0800	[thread overview]
Message-ID: <56e1248e-0956-0446-1c45-d280c396d378@gmx.com> (raw)
In-Reply-To: <169ba15cd316c181042bbe25e7d10c7963e3b7e8.1610444879.git.anand.jain@oracle.com>



On 2021/1/12 下午6:34, Anand Jain wrote:
> In the current kernel both scrub and balance fails due to ENOSPC,
> however there is no reason that it should be transitioned to the
> RDONLY and making free spaces difficult.

This just masks the real problem.

 From all your reports, the problem is the same, we exhausted the
metadata space, but the GlobalRSV is only 100+MiB.

It looks like the problem Josef is working on to make GlobalRSV work as
usual.

Definitely not the proper way to fix it.

Thanks,
Qu
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>   fs/btrfs/super.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 12d7d3be7cd4..8c1b858f55c4 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -172,6 +172,9 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
>   	if (sb_rdonly(sb))
>   		return;
>
> +	if (errno == -ENOSPC)
> +		return;
> +
>   	btrfs_discard_stop(fs_info);
>
>   	/* btrfs handle error by forcing the filesystem readonly */
>

  parent reply	other threads:[~2021-01-12 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 10:34 [PATCH RFC] btrfs: no need to transition to rdonly for ENOSPC error Anand Jain
2021-01-12 13:09 ` Filipe Manana
2021-01-12 13:39 ` Qu Wenruo [this message]
2021-01-12 14:41 ` Josef Bacik
2021-01-13 11:22   ` Anand Jain

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=56e1248e-0956-0446-1c45-d280c396d378@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=anand.jain@oracle.com \
    --cc=josef@toxicpanda.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.