| From: |
| Naohiro Aota <naohiro.aota-AT-wdc.com> |
| To: |
| linux-btrfs-AT-vger.kernel.org |
| Subject: |
| [PATCH v2 0/4] btrfs: tests: zoned: add selftest for zoned code |
| Date: |
| Mon, 26 Jan 2026 14:49:49 +0900 |
| Message-ID: |
| <20260126054953.2245883-1-naohiro.aota@wdc.com> |
| Cc: |
| Naohiro Aota <naohiro.aota-AT-wdc.com> |
| Archive-link: |
| Article |
Having conventional zones on a RAID profile made the alloc_offset
loading code enough complex. It would be good time to add btrfs test for
the zoned code.
For now it tests btrfs_load_block_group_by_raid_type() with various test
cases. The load_zone_info_tests[] array defines the test cases.
- v2:
- Fix compile error without CONFIG_BLK_DEV_ZONED
- v1: https://lore.kernel.org/linux-btrfs/20260123125920.412958...
Naohiro Aota (4):
btrfs: tests: add cleanup functions for test specific functions
btrfs: add cleanup function for btrfs_free_chunk_map
btrfs: zoned: factor out the zone loading part into a testable
function
btrfs: tests: zoned: add selftest for zoned code
fs/btrfs/Makefile | 4 +
fs/btrfs/tests/btrfs-tests.c | 3 +
fs/btrfs/tests/btrfs-tests.h | 14 +
fs/btrfs/tests/zoned-tests.c | 676 +++++++++++++++++++++++++++++++++++
fs/btrfs/volumes.h | 1 +
fs/btrfs/zoned.c | 112 +++---
fs/btrfs/zoned.h | 9 +
7 files changed, 771 insertions(+), 48 deletions(-)
create mode 100644 fs/btrfs/tests/zoned-tests.c
--
2.52.0