summaryrefslogtreecommitdiff
path: root/fs/bcachefs/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-07-05 22:02:07 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-04-17 15:43:04 -0400
commit695a1dfce11a3e674bb9f7276e18bcc48eaf4ac5 (patch)
treea6041bbe9c8c76ed05c14de5a6510c76a728068f /fs/bcachefs/debug.c
parent2f66146c6552d1f7dd0f4eae7e89dc34a20aef3b (diff)
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/debug.c')
-rw-r--r--fs/bcachefs/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c
index 4215c119e0a2..92e970bc1332 100644
--- a/fs/bcachefs/debug.c
+++ b/fs/bcachefs/debug.c
@@ -313,7 +313,7 @@ static ssize_t bch2_read_btree_formats(struct file *file, char __user *buf,
if (err)
return err;
- if (!i->size || !bpos_cmp(POS_MAX, i->from))
+ if (!i->size || !bpos_cmp(SPOS_MAX, i->from))
return i->ret;
bch2_trans_init(&trans, i->c, 0, 0);
@@ -329,7 +329,7 @@ static ssize_t bch2_read_btree_formats(struct file *file, char __user *buf,
* can't easily correctly restart a btree node traversal across
* all nodes, meh
*/
- i->from = bpos_cmp(POS_MAX, b->key.k.p)
+ i->from = bpos_cmp(SPOS_MAX, b->key.k.p)
? bpos_successor(b->key.k.p)
: b->key.k.p;