diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-07-25 13:52:14 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:24 -0400 |
commit | 99aaf57000b4091d2471ed30387d96e15f2fc38b (patch) | |
tree | fe76da2b20b6e089158c640b8d4e6b15bb0488d7 /fs/bcachefs/migrate.c | |
parent | b1c9358a25eb0ed94c5bfc18ba5f9b00d51d8863 (diff) |
bcachefs: Refactor various code to not be extent specific
With reflink, various code now has to handle both KEY_TYPE_extent
or KEY_TYPE_reflink_v - so, convert it to be generic across all keys
with pointers.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/migrate.c')
-rw-r--r-- | fs/bcachefs/migrate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c index ad41f5e36a7c..301cb72bd3e4 100644 --- a/fs/bcachefs/migrate.c +++ b/fs/bcachefs/migrate.c @@ -49,8 +49,7 @@ static int bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags) while ((k = bch2_btree_iter_peek(iter)).k && !(ret = bkey_err(k))) { - if (!bkey_extent_is_data(k.k) || - !bch2_extent_has_device(bkey_s_c_to_extent(k), dev_idx)) { + if (!bch2_bkey_has_device(k, dev_idx)) { ret = bch2_mark_bkey_replicas(c, k); if (ret) break; |