summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/migrate.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-10 16:28:37 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:56 -0400
commit702ffea204840455e4f2d918538c39cc5c59666b (patch)
tree01eeae0e0b0aeb6b681025bf3a9be680d1abef2a /fs/bcachefs/migrate.c
parent3f5d3fb4025a7196e75250ecee8b6478f086a145 (diff)
downloadlinux-stable-702ffea204840455e4f2d918538c39cc5c59666b.tar.gz
linux-stable-702ffea204840455e4f2d918538c39cc5c59666b.tar.bz2
linux-stable-702ffea204840455e4f2d918538c39cc5c59666b.zip
bcachefs: Extent helper improvements
- __bch2_bkey_drop_ptr() -> bch2_bkey_drop_ptr_noerror(), now available outside extents. - Split bch2_bkey_has_device() and bch2_bkey_has_device_c(), const and non const versions - bch2_extent_has_ptr() now returns the pointer it found Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/migrate.c')
-rw-r--r--fs/bcachefs/migrate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c
index e3e39127b40a..d93db07f0c87 100644
--- a/fs/bcachefs/migrate.c
+++ b/fs/bcachefs/migrate.c
@@ -46,7 +46,7 @@ static int bch2_dev_usrdata_drop_key(struct btree_trans *trans,
struct bkey_i *n;
int ret;
- if (!bch2_bkey_has_device(k, dev_idx))
+ if (!bch2_bkey_has_device_c(k, dev_idx))
return 0;
n = bch2_bkey_make_mut(trans, k);
@@ -130,8 +130,7 @@ retry:
while (bch2_trans_begin(&trans),
(b = bch2_btree_iter_peek_node(&iter)) &&
!(ret = PTR_ERR_OR_ZERO(b))) {
- if (!bch2_bkey_has_device(bkey_i_to_s_c(&b->key),
- dev_idx))
+ if (!bch2_bkey_has_device_c(bkey_i_to_s_c(&b->key), dev_idx))
goto next;
bch2_bkey_buf_copy(&k, c, &b->key);