summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-04 08:09:26 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:30 +0300
commitd1d7737fd9df0cc57cd276b0189faf8c92c1426f (patch)
tree351c9884cb6f7b7f47dcfdf955ca6b1e04fe5e71 /fs/bcachefs/recovery.h
parent7c7e071d90ac278e462640570d739dd165d3acd0 (diff)
downloadlinux-d1d7737fd9df0cc57cd276b0189faf8c92c1426f.tar.xz
bcachefs: Gap buffer for journal keys
Btree updates before we go RW work by inserting into the array of keys that journal replay will insert - but inserting into a flat array is O(n), meaning if btree_gc needs to update many alloc keys, we're O(n^2). Fortunately, the updates btree_gc does happens in sequential order, which means a gap buffer works nicely here - this patch implements a gap buffer for journal keys. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/recovery.h')
-rw-r--r--fs/bcachefs/recovery.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/recovery.h b/fs/bcachefs/recovery.h
index e6927a918df3..30580a8984a1 100644
--- a/fs/bcachefs/recovery.h
+++ b/fs/bcachefs/recovery.h
@@ -2,9 +2,6 @@
#ifndef _BCACHEFS_RECOVERY_H
#define _BCACHEFS_RECOVERY_H
-#define for_each_journal_key(keys, i) \
- for (i = (keys).d; i < (keys).d + (keys).nr; (i)++)
-
struct journal_iter {
struct list_head list;
enum btree_id btree_id;