summaryrefslogtreecommitdiff
path: root/libbcachefs/rebalance.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-08-21 13:17:42 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-08-21 13:19:36 -0400
commit72a408f84846fe702b8db4f158b678ee20bbf835 (patch)
tree840abaa16478b4b5105697d4987257c33d37bff2 /libbcachefs/rebalance.c
parentf5ec33b55636b2c6c374872984a6839b1de36249 (diff)
Update bcachefs sources to ece184f718 bcachefs: Reflink
Diffstat (limited to 'libbcachefs/rebalance.c')
-rw-r--r--libbcachefs/rebalance.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbcachefs/rebalance.c b/libbcachefs/rebalance.c
index 6bdd6817..4797d620 100644
--- a/libbcachefs/rebalance.c
+++ b/libbcachefs/rebalance.c
@@ -38,9 +38,9 @@ void bch2_rebalance_add_key(struct bch_fs *c,
struct bkey_s_c k,
struct bch_io_opts *io_opts)
{
+ struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k);
const union bch_extent_entry *entry;
struct extent_ptr_decoded p;
- struct bkey_s_c_extent e;
if (!bkey_extent_is_data(k.k))
return;
@@ -49,9 +49,7 @@ void bch2_rebalance_add_key(struct bch_fs *c,
!io_opts->background_compression)
return;
- e = bkey_s_c_to_extent(k);
-
- extent_for_each_ptr_decode(e, p, entry)
+ bkey_for_each_ptr_decode(k.k, ptrs, p, entry)
if (rebalance_ptr_pred(c, p, io_opts)) {
struct bch_dev *ca = bch_dev_bkey_exists(c, p.ptr.dev);