linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "hch@infradead.org" <hch@infradead.org>
To: Naohiro Aota <Naohiro.Aota@wdc.com>
Cc: "hch@infradead.org" <hch@infradead.org>,
	Josef Bacik <josef@toxicpanda.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	"kernel-team@fb.com" <kernel-team@fb.com>
Subject: Re: [PATCH v2 2/2] btrfs-progs: set the proper minimum size for a zoned file system
Date: Sun, 9 Jul 2023 22:28:12 -0700	[thread overview]
Message-ID: <ZKuW7IkT9wtgJXQw@infradead.org> (raw)
In-Reply-To: <wbsmajimcou2ow6s4rtzeopwvd5dhku7hcdvm2u3doy6lagvev@3kga7xlvxn5t>

On Mon, Jul 10, 2023 at 12:57:52AM +0000, Naohiro Aota wrote:
> It depends on what we consider the "minimal" is.

I think minimal means a file system that can actually be be continuously
used.

> Even with the 5 zones (2
> SBs + 1 per BG type), we can start writing to the file-system.
> 
> If you need to run a relocation, one more block group for it is needed.
> 
> The fsync block group might be optional because if the fsync node
> allocation failed, it should fall back to the full sync. It will kill the
> performance but still works...
> 
> If we say it is the "minimal" that we can infinitely write and delete a
> file without ENOSPC, we need one (or two, depending on the metadata
> profile) more BGs per META/SYSTEM.

Based on my above sentence we then need:

 2 zones for the primary superblock

metadata replication factor * (
  2 zones for the system block group
  2 zone for a metadata block group
  2 zone for the tree log)


data replication factor * (
 1 zone for a data block group
 1 zone for a relocation block group
)

where the two for the non-sb, non-data blocks accounts for beeing
able to continue writing after filling up one bg and allowing
gc.  In fact even just two might lead to deadlocks in that case
depending on the exact algorithm in other zoned storage systems,
but I don't know enough about btrfs metadata placement to understand
how that works on zoned btrfs right now.

  reply	other threads:[~2023-07-10  5:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 15:53 [PATCH v2 0/2] btrfs-progs: some zoned mkfs fixups Josef Bacik
2023-07-06 15:53 ` [PATCH v2 1/2] btrfs-progs: print out the correct minimum size for zoned file systems Josef Bacik
2023-07-07 11:36   ` Christoph Hellwig
2023-07-06 15:54 ` [PATCH v2 2/2] btrfs-progs: set the proper minimum size for a zoned file system Josef Bacik
2023-07-07 11:38   ` Christoph Hellwig
2023-07-10  0:57     ` Naohiro Aota
2023-07-10  5:28       ` hch [this message]
2023-07-13 18:19         ` David Sterba
2023-07-21  6:43           ` Naohiro Aota
2023-07-10  0:59   ` Naohiro Aota
2023-07-07  9:10 ` [PATCH v2 0/2] btrfs-progs: some zoned mkfs fixups Johannes Thumshirn

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=ZKuW7IkT9wtgJXQw@infradead.org \
    --to=hch@infradead.org \
    --cc=Naohiro.Aota@wdc.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;
as well as URLs for NNTP newsgroup(s).