All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: cleanup related to the 1MiB reserved space
Date: Mon, 13 Jun 2022 15:06:33 +0800	[thread overview]
Message-ID: <cover.1655103954.git.wqu@suse.com> (raw)

The 1MiB reserved space is only introduced in v4.1 btrfs-progs, and
kernel has the same reserved space around the same time.

But there are two small nitpicks:

- Kernel never has a unified MACRO for this
  We just use SZ_1M, with extra comments on this.

  This makes later write-intent bitmap harder to implement, as the
  incoming write-intent bitmap will enlarge the reserved space to
  2MiB, and use the extra 1MiB for write-intent bitmap.
  (of course with extra RO compat flags)

  This will be addressed in the first patch, with a new
  BTRFS_DEFAULT_RESERVED macro.

  Later write-intent bitmap code will use BTRFS_DEFAULT_RESERVED as a
  beacon to ensure btrfs never touches the enlarged reserved space.

- No warning on such very old fses.
  Although kernel can handle such old fses without any problem,
  it's still better to output a warning, with a solution (just balance).

  For now, we only need a warning, but for the incoming write-intent
  bitmap, any dev extents inside the extra reserved space will be
  rejected.


Qu Wenruo (2):
  btrfs: introduce BTRFS_DEFAULT_RESERVED macro
  btrfs: warn about dev extents that are inside the reserved range

 fs/btrfs/ctree.h       |  7 +++++++
 fs/btrfs/extent-tree.c |  6 +++---
 fs/btrfs/super.c       | 10 +++++-----
 fs/btrfs/volumes.c     | 17 +++++++++++------
 4 files changed, 26 insertions(+), 14 deletions(-)

-- 
2.36.1


             reply	other threads:[~2022-06-13  7:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  7:06 Qu Wenruo [this message]
2022-06-13  7:06 ` [PATCH 1/2] btrfs: introduce BTRFS_DEFAULT_RESERVED macro Qu Wenruo
2022-06-13  9:13   ` Nikolay Borisov
2022-06-13  9:36     ` Qu Wenruo
2022-06-16 15:20       ` David Sterba
2022-06-17  1:47         ` Qu Wenruo
2022-06-17 14:04           ` David Sterba
2022-06-13  7:06 ` [PATCH 2/2] btrfs: warn about dev extents that are inside the reserved range Qu Wenruo
2022-06-13 19:05   ` Boris Burkov
2022-06-14  7:48     ` Qu Wenruo
2022-06-14 15:30       ` Boris Burkov
2022-06-14 22:12         ` Qu Wenruo
2022-06-16 15:03           ` David Sterba
2022-06-13 18:20 ` [PATCH 0/2] btrfs: cleanup related to the 1MiB reserved space David Sterba
2022-06-13 23:50   ` Qu Wenruo
2022-06-14 13:56     ` 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=cover.1655103954.git.wqu@suse.com \
    --to=wqu@suse.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.