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>
This commit is contained in:
Kent Overstreet 2022-11-16 00:03:36 -05:00
parent d9905d97d0
commit e4716b10ed

View File

@ -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;
}