mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-10 00:00:04 +03:00
cmd_migrate: fix write_data()
passing a parent closure is totally unnecessary when using BCH_WRITE_SYNC - and pops an assert in debug mode, because the write path no longer supports delivering completions that way. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f2cb831b99
commit
3233d8a0c4
@ -251,14 +251,11 @@ static void write_data(struct bch_fs *c,
|
||||
{
|
||||
struct bch_write_op op;
|
||||
struct bio_vec bv[WRITE_DATA_BUF / PAGE_SIZE];
|
||||
struct closure cl;
|
||||
|
||||
BUG_ON(dst_offset & (block_bytes(c) - 1));
|
||||
BUG_ON(len & (block_bytes(c) - 1));
|
||||
BUG_ON(len > WRITE_DATA_BUF);
|
||||
|
||||
closure_init_stack(&cl);
|
||||
|
||||
bio_init(&op.wbio.bio, NULL, bv, ARRAY_SIZE(bv), 0);
|
||||
bch2_bio_map(&op.wbio.bio, buf, len);
|
||||
|
||||
@ -274,7 +271,7 @@ static void write_data(struct bch_fs *c,
|
||||
if (ret)
|
||||
die("error reserving space in new filesystem: %s", bch2_err_str(ret));
|
||||
|
||||
closure_call(&op.cl, bch2_write, NULL, &cl);
|
||||
closure_call(&op.cl, bch2_write, NULL, NULL);
|
||||
|
||||
dst_inode->bi_sectors += len >> 9;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user