Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/7] btrfs-progs: zoned: proper "mkfs.btrfs -b" support
@ 2024-05-14  0:51 Naohiro Aota
  2024-05-14  0:51 ` [PATCH 1/7] btrfs-progs: rename block_count to byte_count Naohiro Aota
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Naohiro Aota @ 2024-05-14  0:51 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Naohiro Aota

mkfs.btrfs -b <byte_count> on a zoned device has several issues listed
below.

- The FS size needs to be larger than minimal size that can host a btrfs,
  but its calculation does not consider non-SINGLE profile
- The calculation also does not ensure tree-log BG and data relocation BG
- It allows creating a FS not aligned to the zone boundary
- It resets all device zones beyond the specified length

This series fixes the issues with some cleanups.

Patches 1 to 3 are clean up patches, so they should not change the behavior.

Patches 4 to 6 address the issues and the last patch adds a test case.

Naohiro Aota (7):
  btrfs-progs: rename block_count to byte_count
  btrfs-progs: mkfs: remove duplicated device size check
  btrfs-progs: mkfs: unify zoned mode minimum size calc into
    btrfs_min_dev_size()
  btrfs-progs: mkfs: fix minimum size calculation for zoned
  btrfs-progs: mkfs: check if byte_count is zone size aligned
  btrfs-progs: support byte length for zone resetting
  btrfs-progs: add test for zone resetting

 common/device-utils.c                    | 45 +++++++------
 kernel-shared/zoned.c                    | 23 ++++++-
 kernel-shared/zoned.h                    |  2 +-
 mkfs/common.c                            | 48 +++++++++++++-
 mkfs/common.h                            |  2 +-
 mkfs/main.c                              | 82 ++++++++++--------------
 tests/mkfs-tests/032-zoned-reset/test.sh | 62 ++++++++++++++++++
 7 files changed, 192 insertions(+), 72 deletions(-)
 create mode 100755 tests/mkfs-tests/032-zoned-reset/test.sh

--
2.45.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-14 17:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14  0:51 [PATCH 0/7] btrfs-progs: zoned: proper "mkfs.btrfs -b" support Naohiro Aota
2024-05-14  0:51 ` [PATCH 1/7] btrfs-progs: rename block_count to byte_count Naohiro Aota
2024-05-14  0:51 ` [PATCH 2/7] btrfs-progs: mkfs: remove duplicated device size check Naohiro Aota
2024-05-14  0:51 ` [PATCH 3/7] btrfs-progs: mkfs: unify zoned mode minimum size calc into btrfs_min_dev_size() Naohiro Aota
2024-05-14  0:51 ` [PATCH 4/7] btrfs-progs: mkfs: fix minimum size calculation for zoned Naohiro Aota
2024-05-14  0:51 ` [PATCH 5/7] btrfs-progs: mkfs: check if byte_count is zone size aligned Naohiro Aota
2024-05-14  0:51 ` [PATCH 6/7] btrfs-progs: support byte length for zone resetting Naohiro Aota
2024-05-14  0:51 ` [PATCH 7/7] btrfs-progs: add test " Naohiro Aota
2024-05-14 15:39 ` [PATCH 0/7] btrfs-progs: zoned: proper "mkfs.btrfs -b" support David Sterba
2024-05-14 17:14   ` Naohiro Aota
2024-05-14 17:21     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox