From 99aaf57000b4091d2471ed30387d96e15f2fc38b Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 25 Jul 2019 13:52:14 -0400 Subject: 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 --- fs/bcachefs/migrate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/bcachefs/migrate.c') 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; -- cgit v1.2.3