All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: further cleanup on fs_info->dirty_cowonly_roots
@ 2026-10-12 22:58 Qu Wenruo
  2026-10-12 22:58 ` [PATCH 1/2] btrfs: always remove quota_root from dirty_cowonly_roots Qu Wenruo
  2026-10-13  5:41   ` Qu Wenruo
  0 siblings, 2 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-10-12 22:58 UTC (permalink / raw)
  To: linux-btrfs

Sashiko mentioned that dirty_cowonly_roots can still be non-empty if a
transaction aborts during commit_cowonly_roots().

However it should not cause any problem, as after a transaction is
aborted, no one will ever touch dirty_cowonly_roots.
So even if it has some dangling pointers, as long as no one is reading
it, it's completely fine.

Furthermore, dirty_cowonly_roots contains roots that are not subvolume
nor log trees, thus they should not have swapped qgroup blocks nor
dirty_log_pages. This means no memory leak from those two members
either.

But we're still depending on such quirky behavior, and it's only going
to cause more false alerts from various LLMs, e.g. Sashiko is already
reporting problems on this.

This series change the behavior to a dedicated cleanup, so that we no
longer relies on those hidden quirks.

Qu Wenruo (2):
  btrfs: always remove quota_root from dirty_cowonly_roots
  btrfs: cleanup dirty_cowonly_roots during btrfs_free_fs_roots()

 fs/btrfs/disk-io.c | 14 ++++++++++++++
 fs/btrfs/qgroup.c  | 10 ++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-10-13  5:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 22:58 [PATCH 0/2] btrfs: further cleanup on fs_info->dirty_cowonly_roots Qu Wenruo
2026-10-12 22:58 ` [PATCH 1/2] btrfs: always remove quota_root from dirty_cowonly_roots Qu Wenruo
2026-10-12 22:58 ` [PATCH 2/2] btrfs: cleanup dirty_cowonly_roots during btrfs_free_fs_roots() Qu Wenruo
2026-10-13  5:41   ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.