Hi all, Here's v2 of the bcachefs freeze and related bugfix patches. Patch 1 of the original series has been merged. Patches 1-3 of this series have been reworked a bit to address some of Kent's concerns, particularly around increasing the amount of inline code. The factoring has been reworked a bit to address that, but otherwise the fundamental fix in patch 3 is the same: allow journal reservation to hold an indirect reference on the pin list via the journal buffer.
Patch 4 adds initial support for the vfs freeze mechanism. This is technically still a bit incomplete because we don't include intwrite freeze protection, but technically afaict things still function correctly mainly due to bcachefs' nearly overlapping write reference mechanism. So all in all while it seems like this could still be improved, that requires further thought and doesn't seem to warrant further gating. Further details and caveats are discussed in the commit log. This survives all of the usual regression tests with the only observable failure being generic/459. This is a newly enabled (freeze dependent) test that intentionally produces I/O errors via dm-thin overprovisioning. The reason for the occasional test failure is that the filesystem shuts down due to these I/O errors. This is generally expected behavior for bcachefs and so not an immediate freeze issue. Finally, CI regression is ongoing and observable here: https://evilpiepirate.org/~testdashboard/ci?branch=bfoster Thoughts, reviews, flames appreciated. Brian v2: - Reworked approach to final journal buffer processing. - Appended initial freeze support patch. v1: https://lore.kernel.org/linux-bcachefs/[email protected]/ Brian Foster (4): bcachefs: refactor pin put helpers bcachefs: prepare journal buf put to handle pin put bcachefs: fix race between journal entry close and pin set bcachefs: initial freeze/unfreeze support fs/bcachefs/fs.c | 31 +++++++++++++++++++++++++++++-- fs/bcachefs/journal.c | 20 +++++++++++++------- fs/bcachefs/journal.h | 34 ++++++++++++++++++++++++++++------ fs/bcachefs/journal_reclaim.c | 11 ++++------- fs/bcachefs/journal_reclaim.h | 3 ++- 5 files changed, 76 insertions(+), 23 deletions(-) -- 2.41.0
