All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: Erik Jensen <erikjensen@rkjnsn.net>
Subject: Re: [PATCH v2] btrfs: do more graceful error/warning for 32bit kernel
Date: Thu, 8 Apr 2021 14:11:27 -0400	[thread overview]
Message-ID: <94dc96e5-fd89-87de-c585-edaea3fc51d7@toxicpanda.com> (raw)
In-Reply-To: <20210225011814.24009-1-wqu@suse.com>

On 2/24/21 8:18 PM, Qu Wenruo wrote:
> Due to the pagecache limit of 32bit systems, btrfs can't access metadata
> at or beyond (ULONG_MAX + 1) << PAGE_SHIFT.
> This is 16T for 4K page size while 256T for 64K page size.
> 
> And unlike other fses, btrfs uses internally mapped u64 address space for
> all of its metadata, this is more tricky than other fses.
> 
> Users can have a fs which doesn't have metadata beyond the boundary at
> mount time, but later balance can cause btrfs to create metadata beyond
> the boundary.
> 
> And modification to MM layer is unrealistic just for such minor use
> case.
> 
> To address such problem, this patch will introduce the following checks,
> much like how XFS handles such problem:
> 
> - Mount time rejection
>    This will reject any fs which has metadata chunk at or beyond the
>    boundary.
> 
> - Mount time early warning
>    If there is any metadata chunk beyond 5/8 of the boundary, we do an
>    early warning and hope the end user will see it.
> 
> - Runtime extent buffer rejection
>    If we're going to allocate an extent buffer at or beyond the boundary,
>    reject such request with -EOVERFLOW.
>    This is definitely going to cause problems like transaction abort, but
>    we have no better ways.
> 
> - Runtime extent buffer early warning
>    If an extent buffer beyond 5/8 of the max file size is allocated, do
>    an early warning.
> 
> Above error/warning message will only be outputted once for each fs to
> reduce dmesg flood.
> 
> Reported-by: Erik Jensen <erikjensen@rkjnsn.net>
> Signed-off-by: Qu Wenruo <wqu@suse.com>

This doesn't apply cleanly to misc-next so it needs to be respun, but otherwise

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef

  parent reply	other threads:[~2021-04-08 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25  1:18 [PATCH v2] btrfs: do more graceful error/warning for 32bit kernel Qu Wenruo
2021-04-08  8:36 ` Qu Wenruo
2021-04-08 18:11 ` Josef Bacik [this message]
2021-04-09  5:24 Qu Wenruo
2021-04-20 18:06 ` David Sterba

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=94dc96e5-fd89-87de-c585-edaea3fc51d7@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=erikjensen@rkjnsn.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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 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.