summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_gc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-07-05 22:02:07 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:07 -0400
commit618b1c0e20ac7bccebba0346ab1e1403fadd6aa0 (patch)
tree7583ac63d71611ab8cf544f1a8b80f29588da544 /fs/bcachefs/btree_gc.c
parent41e633826a1418f3b492d9137d395289e6e67d15 (diff)
downloadlwn-618b1c0e20ac7bccebba0346ab1e1403fadd6aa0.tar.gz
lwn-618b1c0e20ac7bccebba0346ab1e1403fadd6aa0.zip
bcachefs: Split out SPOS_MAX
Internal btree code really wants a POS_MAX with all fields ~0; external code more likely wants the snapshot field to be 0, because when we're passing it to bch2_trans_get_iter() it's used for the snapshot we're operating in, which should be 0 for most btrees that don't use snapshots. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-rw-r--r--fs/bcachefs/btree_gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index 1d690190d958..8bddab73a461 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -962,7 +962,7 @@ static int bch2_gc_btree_init(struct bch_fs *c,
goto fsck_err;
}
- if (mustfix_fsck_err_on(bpos_cmp(b->data->max_key, POS_MAX), c,
+ if (mustfix_fsck_err_on(bpos_cmp(b->data->max_key, SPOS_MAX), c,
"btree root with incorrect max_key: %s",
(bch2_bpos_to_text(&PBUF(buf), b->data->max_key), buf))) {
bch_err(c, "repair unimplemented");