bcachefs: kill bch2_bkey_needs_rebalance()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 20 Oct 2024 05:40:19 +0000 (01:40 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:15 +0000 (01:36 -0500)
Dead code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/extents.c
fs/bcachefs/extents.h

index 243cb15b74b34cb0f52f106a0be73cfccf1ddfe1..6ad5ff7c82390cb84636ae4d35887d9cd70599d8 100644 (file)
@@ -1442,23 +1442,6 @@ incompressible:
        return rewrite_ptrs;
 }
 
-bool bch2_bkey_needs_rebalance(struct bch_fs *c, struct bkey_s_c k)
-{
-       const struct bch_extent_rebalance *r = bch2_bkey_rebalance_opts(k);
-
-       /*
-        * If it's an indirect extent, we don't delete the rebalance entry when
-        * done so that we know what options were applied - check if it still
-        * needs work done:
-        */
-       if (r &&
-           k.k->type == KEY_TYPE_reflink_v &&
-           !bch2_bkey_ptrs_need_rebalance(c, k, r->target, r->compression))
-               r = NULL;
-
-       return r != NULL;
-}
-
 static u64 __bch2_bkey_sectors_need_rebalance(struct bch_fs *c, struct bkey_s_c k,
                                       unsigned target, unsigned compression)
 {
index bcffcf60aaaf8924a3754b734dafa679d31b5657..9374599b384d555b81de0ce71e917e5fe64b884e 100644 (file)
@@ -713,7 +713,6 @@ void bch2_ptr_swab(struct bkey_s);
 const struct bch_extent_rebalance *bch2_bkey_rebalance_opts(struct bkey_s_c);
 unsigned bch2_bkey_ptrs_need_rebalance(struct bch_fs *, struct bkey_s_c,
                                       unsigned, unsigned);
-bool bch2_bkey_needs_rebalance(struct bch_fs *, struct bkey_s_c);
 u64 bch2_bkey_sectors_need_rebalance(struct bch_fs *, struct bkey_s_c);
 
 int bch2_bkey_set_needs_rebalance(struct bch_fs *, struct bkey_i *,