summaryrefslogtreecommitdiff
path: root/libbcachefs/move.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-10-17 18:16:50 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2020-10-17 18:17:36 -0400
commit8a440895bf31ad7c45f6ad7d5766c6b83e2a7f3d (patch)
tree53e06ce5793bd2e65ae480b489f2b44c19649fc0 /libbcachefs/move.c
parenteff87a4c44858cbddbbb00fb42a85c7017231faa (diff)
Update bcachefs sources to 26c226917f bcachefs: Start/stop io clock hands in read/write paths
Diffstat (limited to 'libbcachefs/move.c')
-rw-r--r--libbcachefs/move.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbcachefs/move.c b/libbcachefs/move.c
index 1ffb14a2..62dcac79 100644
--- a/libbcachefs/move.c
+++ b/libbcachefs/move.c
@@ -415,7 +415,7 @@ static void bch2_move_ctxt_wait_for_io(struct moving_context *ctxt)
atomic_read(&ctxt->write_sectors) != sectors_pending);
}
-static int bch2_move_extent(struct bch_fs *c,
+static int bch2_move_extent(struct btree_trans *trans,
struct moving_context *ctxt,
struct write_point_specifier wp,
struct bch_io_opts io_opts,
@@ -424,6 +424,7 @@ static int bch2_move_extent(struct bch_fs *c,
enum data_cmd data_cmd,
struct data_opts data_opts)
{
+ struct bch_fs *c = trans->c;
struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k);
struct moving_io *io;
const union bch_extent_entry *entry;
@@ -490,7 +491,7 @@ static int bch2_move_extent(struct bch_fs *c,
* ctxt when doing wakeup
*/
closure_get(&ctxt->cl);
- bch2_read_extent(c, &io->rbio, k, 0,
+ bch2_read_extent(trans, &io->rbio, k, 0,
BCH_READ_NODECODE|
BCH_READ_LAST_FRAGMENT);
return 0;
@@ -608,7 +609,7 @@ peek:
k = bkey_i_to_s_c(sk.k);
bch2_trans_unlock(&trans);
- ret2 = bch2_move_extent(c, ctxt, wp, io_opts, btree_id, k,
+ ret2 = bch2_move_extent(&trans, ctxt, wp, io_opts, btree_id, k,
data_cmd, data_opts);
if (ret2) {
if (ret2 == -ENOMEM) {