diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-19 19:17:19 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-19 19:17:21 -0500 |
commit | 3233d8a0c460fc9627963658ac59edc5b6186e72 (patch) | |
tree | 2a8e63ad0c216f4193138e4f87b6692b3f403800 | |
parent | f2cb831b993dd44bcab08d43038a0f2843569b9f (diff) |
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>
-rw-r--r-- | cmd_migrate.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd_migrate.c b/cmd_migrate.c index 8b2841ab..265ebd79 100644 --- a/cmd_migrate.c +++ b/cmd_migrate.c @@ -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; } |