All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs: cleanup related to the 1MiB reserved space
Date: Mon, 13 Jun 2022 20:20:34 +0200	[thread overview]
Message-ID: <20220613182034.GC20633@twin.jikos.cz> (raw)
In-Reply-To: <cover.1655103954.git.wqu@suse.com>

On Mon, Jun 13, 2022 at 03:06:33PM +0800, Qu Wenruo wrote:
> The 1MiB reserved space is only introduced in v4.1 btrfs-progs, and
> kernel has the same reserved space around the same time.

Kernel had this since the beginnning, or do you have pointer for the
commits? I know that progs wrongly allocated some of the tree roots
under 1M and this got fixed, but otherwise kernel never used the 1st
megabyte for allocations.

> 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.

Cleaning up the raw 1M value and the comments makes sense, but I'm not
sure about making it dynamic. We used to have mount option and mkfs
parameter alloc_offset and it got removed.

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

Ok, I'll wait with further comments until I see the patches.

  parent reply	other threads:[~2022-06-13 19:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  7:06 [PATCH 0/2] btrfs: cleanup related to the 1MiB reserved space Qu Wenruo
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 ` David Sterba [this message]
2022-06-13 23:50   ` [PATCH 0/2] btrfs: cleanup related to the 1MiB reserved space 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=20220613182034.GC20633@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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.