summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-16 00:03:36 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2022-11-16 00:03:36 -0500
commite4716b10ed0210a13efdd3252c12199da3d52aad (patch)
treef76147653bd20ddd95ec9f6280c4e7cc6ff6527d
parentd9905d97d094027e07bf38f7cc5d6cabff24b528 (diff)
cmd_migrate: Fix for write completion change
bch_write no longer delivers completions via op->cl - this patch changes to use BCH_WRITE_SYNC. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--cmd_migrate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd_migrate.c b/cmd_migrate.c
index 3ba51c0c..707f13e1 100644
--- a/cmd_migrate.c
+++ b/cmd_migrate.c
@@ -265,6 +265,7 @@ static void write_data(struct bch_fs *c,
op.nr_replicas = 1;
op.subvol = 1;
op.pos = SPOS(dst_inode->bi_inum, dst_offset >> 9, U32_MAX);
+ op.flags |= BCH_WRITE_SYNC;
int ret = bch2_disk_reservation_get(c, &op.res, len >> 9,
c->opts.data_replicas, 0);
@@ -272,7 +273,6 @@ static void write_data(struct bch_fs *c,
die("error reserving space in new filesystem: %s", strerror(-ret));
closure_call(&op.cl, bch2_write, NULL, &cl);
- closure_sync(&cl);
dst_inode->bi_sectors += len >> 9;
}