From cd9892e543845e045142ed29e4a5a9ce446a205e Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 24 Aug 2020 16:05:04 -0400 Subject: Update bcachefs sources to 10ab39f2fa bcachefs: Improvements to the journal read error paths --- libbcachefs/super.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libbcachefs/super.h') diff --git a/libbcachefs/super.h b/libbcachefs/super.h index 4aa5dd79..fffee967 100644 --- a/libbcachefs/super.h +++ b/libbcachefs/super.h @@ -222,6 +222,15 @@ void bch2_fs_read_only(struct bch_fs *); int bch2_fs_read_write(struct bch_fs *); int bch2_fs_read_write_early(struct bch_fs *); +/* + * Only for use in the recovery/fsck path: + */ +static inline void bch2_fs_lazy_rw(struct bch_fs *c) +{ + if (percpu_ref_is_zero(&c->writes)) + bch2_fs_read_write_early(c); +} + void bch2_fs_stop(struct bch_fs *); int bch2_fs_start(struct bch_fs *); -- cgit v1.2.3-70-g09d2