mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
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:
parent
d9905d97d0
commit
e4716b10ed
@ -265,6 +265,7 @@ static void write_data(struct bch_fs *c,
|
|||||||
op.nr_replicas = 1;
|
op.nr_replicas = 1;
|
||||||
op.subvol = 1;
|
op.subvol = 1;
|
||||||
op.pos = SPOS(dst_inode->bi_inum, dst_offset >> 9, U32_MAX);
|
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,
|
int ret = bch2_disk_reservation_get(c, &op.res, len >> 9,
|
||||||
c->opts.data_replicas, 0);
|
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));
|
die("error reserving space in new filesystem: %s", strerror(-ret));
|
||||||
|
|
||||||
closure_call(&op.cl, bch2_write, NULL, &cl);
|
closure_call(&op.cl, bch2_write, NULL, &cl);
|
||||||
closure_sync(&cl);
|
|
||||||
|
|
||||||
dst_inode->bi_sectors += len >> 9;
|
dst_inode->bi_sectors += len >> 9;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user