diff options
-rw-r--r-- | Documentation/filesystems/bcachefs/future/idle_work.rst | 6 | ||||
-rw-r--r-- | fs/bcachefs/backpointers.c | 8 | ||||
-rw-r--r-- | fs/bcachefs/btree_io.c | 1 | ||||
-rw-r--r-- | fs/bcachefs/sb-counters_format.h | 1 |
4 files changed, 9 insertions, 7 deletions
diff --git a/Documentation/filesystems/bcachefs/future/idle_work.rst b/Documentation/filesystems/bcachefs/future/idle_work.rst index 59a332509dcd..f1202113dde0 100644 --- a/Documentation/filesystems/bcachefs/future/idle_work.rst +++ b/Documentation/filesystems/bcachefs/future/idle_work.rst @@ -11,10 +11,10 @@ idle" so the system can go to sleep. We don't want to be dribbling out background work while the system should be idle. The complicating factor is that there are a number of background tasks, which -form a heirarchy (or a digraph, depending on how you divide it up) - one +form a hierarchy (or a digraph, depending on how you divide it up) - one background task may generate work for another. -Thus proper idle detection needs to model this heirarchy. +Thus proper idle detection needs to model this hierarchy. - Foreground writes - Page cache writeback @@ -51,7 +51,7 @@ IDLE REGIME When the system becomes idle, we should start flushing our pending work quicker so the system can go to sleep. -Note that the definition of "idle" depends on where in the heirarchy a task +Note that the definition of "idle" depends on where in the hierarchy a task is - a task should start flushing work more quickly when the task above it has stopped generating new work. diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index 01f548751891..cb25cddb759b 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -532,10 +532,6 @@ static int check_bp_exists(struct btree_trans *trans, struct btree_iter other_extent_iter = {}; CLASS(printbuf, buf)(); - if (bpos_lt(bp->k.p, s->bp_start) || - bpos_gt(bp->k.p, s->bp_end)) - return 0; - CLASS(btree_iter, bp_iter)(trans, BTREE_ID_backpointers, bp->k.p, 0); struct bkey_s_c bp_k = bch2_btree_iter_peek_slot(&bp_iter); int ret = bkey_err(bp_k); @@ -690,6 +686,10 @@ static int check_extent_to_backpointers(struct btree_trans *trans, struct bkey_i_backpointer bp; bch2_extent_ptr_to_bp(c, btree, level, k, p, entry, &bp); + if (bpos_lt(bp.k.p, s->bp_start) || + bpos_gt(bp.k.p, s->bp_end)) + continue; + int ret = !empty ? check_bp_exists(trans, s, &bp, k) : bch2_bucket_backpointer_mod(trans, k, &bp, true); diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index b1f58fb31ed1..2e3dd9bacac5 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -1014,6 +1014,7 @@ static int validate_bset_keys(struct bch_fs *c, struct btree *b, k = bkey_p_next(k); continue; drop_this_key: + ret = 0; next_good_key = k->u64s; if (!next_good_key || diff --git a/fs/bcachefs/sb-counters_format.h b/fs/bcachefs/sb-counters_format.h index bfeb713dd210..96ad64920810 100644 --- a/fs/bcachefs/sb-counters_format.h +++ b/fs/bcachefs/sb-counters_format.h @@ -129,6 +129,7 @@ static inline void __maybe_unused check_bch_counter_ids_unique(void) { #define x(t, n, ...) case (n): BCH_PERSISTENT_COUNTERS() #undef x + ; } } |