public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Naohiro Aota <naohiro.aota@wdc.com>
To: linux-btrfs@vger.kernel.org
Cc: Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH 00/11] btrfs: zoned: split out data relocation space_info
Date: Thu,  5 Dec 2024 16:48:16 +0900	[thread overview]
Message-ID: <cover.1733384171.git.naohiro.aota@wdc.com> (raw)

As discussed in [1], there is a longstanding early ENOSPC issue on the
zoned mode even with simple fio script. This is also causing blktests
zbd/009 to fail [2].

[1] https://lore.kernel.org/linux-btrfs/cover.1731571240.git.naohiro.aota@wdc.com/
[2] https://github.com/osandov/blktests/issues/150

This series is the second part to fix the ENOSPC issue. This series
introduces "space_info sub-space" and use it split a space_info for data
relocation block group.

Current code assumes we have only one space_info for each block group type
(DATA, METADATA, and SYSTEM). We sometime needs multiple space_info to
manage special block groups.

One example is handling the data relocation block group for the zoned mode.
That block group is dedicated for writing relocated data and we cannot
allocate any regular extent from that block group, which is implemented in
the zoned extent allocator. That block group still belongs to the normal
data space_info. So, when all the normal data block groups are full and
there are some free space in the dedicated block group, the space_info
looks to have some free space, while it cannot allocate normal extent
anymore. That results in a strange ENOSPC error. We need to have a
space_info for the relocation data block group to represent the situation
properly.

Naohiro Aota (11):
  btrfs: take btrfs_space_info in btrfs_reserve_data_bytes
  btrfs: take struct btrfs_inode in
    btrfs_free_reserved_data_space_noquota
  btrfs: factor out init_space_info()
  btrfs: spin out do_async_reclaim_data_space()
  btrfs: factor out check_removing_space_info()
  btrfs: introduce space_info argument to btrfs_chunk_alloc
  btrfs: pass space_info for block group creation
  btrfs: introduce btrfs_space_info sub-group
  btrfs: tweak extent/chunk allocation for space_info sub-space
  btrfs: use proper data space_info
  btrfs: reclaim from data sub-space space_info

 fs/btrfs/block-group.c    | 89 ++++++++++++++++++++++++---------------
 fs/btrfs/block-group.h    |  5 ++-
 fs/btrfs/delalloc-space.c | 26 ++++++++----
 fs/btrfs/delalloc-space.h |  3 +-
 fs/btrfs/extent-tree.c    |  5 ++-
 fs/btrfs/inode.c          |  4 +-
 fs/btrfs/relocation.c     |  3 +-
 fs/btrfs/space-info.c     | 84 ++++++++++++++++++++++++------------
 fs/btrfs/space-info.h     | 10 ++++-
 fs/btrfs/sysfs.c          | 16 +++++--
 fs/btrfs/transaction.c    |  2 +-
 fs/btrfs/volumes.c        | 16 ++++---
 fs/btrfs/volumes.h        |  2 +-
 13 files changed, 176 insertions(+), 89 deletions(-)

-- 
2.47.1


             reply	other threads:[~2024-12-05  7:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05  7:48 Naohiro Aota [this message]
2024-12-05  7:48 ` [PATCH 01/11] btrfs: take btrfs_space_info in btrfs_reserve_data_bytes Naohiro Aota
2024-12-05 23:48   ` Johannes Thumshirn
2024-12-05  7:48 ` [PATCH 02/11] btrfs: take struct btrfs_inode in btrfs_free_reserved_data_space_noquota Naohiro Aota
2024-12-05 23:49   ` Johannes Thumshirn
2024-12-05  7:48 ` [PATCH 03/11] btrfs: factor out init_space_info() Naohiro Aota
2024-12-05  7:48 ` [PATCH 04/11] btrfs: spin out do_async_reclaim_data_space() Naohiro Aota
2024-12-05  7:48 ` [PATCH 05/11] btrfs: factor out check_removing_space_info() Naohiro Aota
2024-12-07 11:29   ` Johannes Thumshirn
2024-12-10  5:16     ` Naohiro Aota
2024-12-05  7:48 ` [PATCH 06/11] btrfs: introduce space_info argument to btrfs_chunk_alloc Naohiro Aota
2024-12-05  7:48 ` [PATCH 07/11] btrfs: pass space_info for block group creation Naohiro Aota
2024-12-05  7:48 ` [PATCH 08/11] btrfs: introduce btrfs_space_info sub-group Naohiro Aota
2024-12-24 14:21   ` kernel test robot
2024-12-05  7:48 ` [PATCH 09/11] btrfs: tweak extent/chunk allocation for space_info sub-space Naohiro Aota
2024-12-05  7:48 ` [PATCH 10/11] btrfs: use proper data space_info Naohiro Aota
2024-12-05  7:48 ` [PATCH 11/11] btrfs: reclaim from data sub-space space_info Naohiro Aota
2024-12-07 11:35 ` [PATCH 00/11] btrfs: zoned: split out data relocation space_info Johannes Thumshirn
2024-12-10  5:40   ` Naohiro Aota
2025-01-02 14:19     ` 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.1733384171.git.naohiro.aota@wdc.com \
    --to=naohiro.aota@wdc.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