]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/move.c
Update bcachefs sources to eb83f1f842bb mean and variance: Promote to lib/math
[bcachefs-tools-debian] / libbcachefs / move.c
index 3efe6a6e1b555829393521d70655280b58cca157..5ed9f53b8134e88c3e4232dd56efb8441f59ca2a 100644 (file)
@@ -159,7 +159,7 @@ void bch2_move_ctxt_wait_for_io(struct moving_context *ctxt)
                atomic_read(&ctxt->write_sectors) != sectors_pending);
 }
 
-static void bch2_moving_ctxt_flush_all(struct moving_context *ctxt)
+void bch2_moving_ctxt_flush_all(struct moving_context *ctxt)
 {
        move_ctxt_wait_event(ctxt, list_empty(&ctxt->reads));
        bch2_trans_unlock_long(ctxt->trans);
@@ -635,7 +635,7 @@ int bch2_move_data(struct bch_fs *c,
        return ret;
 }
 
-int __bch2_evacuate_bucket(struct moving_context *ctxt,
+int bch2_evacuate_bucket(struct moving_context *ctxt,
                           struct move_bucket_in_flight *bucket_in_flight,
                           struct bpos bucket, int gen,
                           struct data_update_opts _data_opts)
@@ -794,24 +794,6 @@ err:
        return ret;
 }
 
-int bch2_evacuate_bucket(struct bch_fs *c,
-                        struct bpos bucket, int gen,
-                        struct data_update_opts data_opts,
-                        struct bch_ratelimit *rate,
-                        struct bch_move_stats *stats,
-                        struct write_point_specifier wp,
-                        bool wait_on_copygc)
-{
-       struct moving_context ctxt;
-       int ret;
-
-       bch2_moving_ctxt_init(&ctxt, c, rate, stats, wp, wait_on_copygc);
-       ret = __bch2_evacuate_bucket(&ctxt, NULL, bucket, gen, data_opts);
-       bch2_moving_ctxt_exit(&ctxt);
-
-       return ret;
-}
-
 typedef bool (*move_btree_pred)(struct bch_fs *, void *,
                                struct btree *, struct bch_io_opts *,
                                struct data_update_opts *);