diff options
author | Brian Foster <bfoster@redhat.com> | 2023-03-22 08:27:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:59 -0400 |
commit | 349b1d832ba534b802a28f316e40128c54643c32 (patch) | |
tree | e8c727266703c98c8e36b2cce946110f1e55c640 /fs/bcachefs/btree_update.h | |
parent | 3d86f13df67b554a7b27e28a4b144425710409bf (diff) | |
download | linux-349b1d832ba534b802a28f316e40128c54643c32.tar.gz linux-349b1d832ba534b802a28f316e40128c54643c32.tar.bz2 linux-349b1d832ba534b802a28f316e40128c54643c32.zip |
bcachefs: use reservation for log messages during recovery
If we block on journal reservation attempting to log journal
messages during recovery, particularly for the first message(s)
before we start doing actual work, chances are the filesystem ends
up deadlocked.
Allow logged messages to use reserved journal space to mitigate this
problem. In the worst case where no space is available whatsoever,
this at least allows the fs to recognize that the journal is stuck
and fail the mount gracefully.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update.h')
-rw-r--r-- | fs/bcachefs/btree_update.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_update.h b/fs/bcachefs/btree_update.h index 63ff824a72da..5d5321dd42e8 100644 --- a/fs/bcachefs/btree_update.h +++ b/fs/bcachefs/btree_update.h @@ -95,6 +95,7 @@ void bch2_trans_commit_hook(struct btree_trans *, int __bch2_trans_commit(struct btree_trans *, unsigned); int bch2_fs_log_msg(struct bch_fs *, const char *, ...); +int bch2_journal_log_msg(struct bch_fs *, const char *, ...); /** * bch2_trans_commit - insert keys at given iterator positions |