summaryrefslogtreecommitdiff
path: root/libbcachefs/super.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-08-24 16:05:04 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2020-08-24 16:25:05 -0400
commitcd9892e543845e045142ed29e4a5a9ce446a205e (patch)
tree1556289a5366d5cdfff32f9669cf748e39ed5063 /libbcachefs/super.h
parent21ade396535e51503511f42ea06d58e25c0646c5 (diff)
Update bcachefs sources to 10ab39f2fa bcachefs: Improvements to the journal read error paths
Diffstat (limited to 'libbcachefs/super.h')
-rw-r--r--libbcachefs/super.h9
1 files changed, 9 insertions, 0 deletions
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 *);