From: Nikita Ofitserov via B4 Relay <devnull+himikof.gmail.com@kernel.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, Nikita Ofitserov <himikof@gmail.com>
Subject: [PATCH v3 0/7] Accounting for accurate progress reporting
Date: Thu, 04 Sep 2025 08:20:31 +0300 [thread overview]
Message-ID: <20250904-better-progress-v3-0-6cc4edf543f4@gmail.com> (raw)
This patch series introduces new per-btree accounting counters and uses
them for (hopefully) accurate progress reporting in recovery passes.
Also includes various assorted bugfixes.
The commit "Relax restrictions on the number of accounting
counters" is optional, but will likely greatly improve the
upgrade/tools version mismatch experience. Without it, all bree usage
accounting will be thrown out and rebuilt on any version mismatch.
The commit "bcachefs_metadata_version_btree_node_accounting"
introduces the format change along with upgrade/downgrade table entries.
The first two commits are drive-by fixes/improvements.
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
---
Changes in v3:
- Removed already merged patches
- Fixed a locking issue in do_bch2_trans_commit_to_journal_replay
- Link to v2: https://lore.kernel.org/r/20250828-better-progress-v2-0-c088a2003940@gmail.com
Changes in v2:
- Reordered the format-change-dependent commits to the end
- Added the new metadata version, upgrade and downgrade entries
- Fixed an issue with hidden usage calculation after device removal
- Link to v1: https://lore.kernel.org/r/20250827-better-progress-v1-0-74c24de7988a@gmail.com
---
Nikita Ofitserov (7):
bcachefs: Fix missing c->usage updates from early recovery
bcachefs: Fix online hidden (sb+journal) data accounting
bcachefs: Relax restrictions on the number of accounting counters
bcachefs: bcachefs_metadata_version_btree_node_accounting
bcachefs: Use explicit node counts in progress reporting
bcachefs: Better progress reporting for btree iteration without leaves
bcachefs: More accurate progress reporting for inner node iteration
fs/bcachefs/backpointers.c | 4 +++-
fs/bcachefs/bcachefs_format.h | 3 ++-
fs/bcachefs/btree_gc.c | 2 +-
fs/bcachefs/btree_trans_commit.c | 4 ++++
fs/bcachefs/buckets.c | 16 ++++++++++-----
fs/bcachefs/disk_accounting.c | 23 ++++++++++++++-------
fs/bcachefs/disk_accounting.h | 14 ++++++++-----
fs/bcachefs/disk_accounting_format.h | 10 ++++++++-
fs/bcachefs/migrate.c | 13 ++++++++----
fs/bcachefs/progress.c | 39 ++++++++++++++++++++++++++++++------
fs/bcachefs/progress.h | 12 ++++++++++-
fs/bcachefs/sb-downgrade.c | 11 ++++++++--
12 files changed, 117 insertions(+), 34 deletions(-)
---
base-commit: 5b7f3db1969892f536be48e082a32095aa86042a
change-id: 20250826-better-progress-835d946a3c38
Best regards,
--
Nikita Ofitserov
next reply other threads:[~2025-09-04 5:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 5:20 Nikita Ofitserov via B4 Relay [this message]
2025-09-04 5:20 ` [PATCH v3 1/7] bcachefs: Fix missing c->usage updates from early recovery Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 2/7] bcachefs: Fix online hidden (sb+journal) data accounting Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 3/7] bcachefs: Relax restrictions on the number of accounting counters Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 4/7] bcachefs: bcachefs_metadata_version_btree_node_accounting Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 5/7] bcachefs: Use explicit node counts in progress reporting Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 6/7] bcachefs: Better progress reporting for btree iteration without leaves Nikita Ofitserov via B4 Relay
2025-09-04 5:20 ` [PATCH v3 7/7] bcachefs: More accurate progress reporting for inner node iteration Nikita Ofitserov via B4 Relay
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=20250904-better-progress-v3-0-6cc4edf543f4@gmail.com \
--to=devnull+himikof.gmail.com@kernel.org \
--cc=himikof@gmail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@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