summaryrefslogtreecommitdiff
path: root/cmd_migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd_migrate.c')
-rw-r--r--cmd_migrate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd_migrate.c b/cmd_migrate.c
index 265ebd79..77bcedcd 100644
--- a/cmd_migrate.c
+++ b/cmd_migrate.c
@@ -273,7 +273,11 @@ static void write_data(struct bch_fs *c,
closure_call(&op.cl, bch2_write, NULL, NULL);
+ BUG_ON(!(op.flags & BCH_WRITE_DONE));
dst_inode->bi_sectors += len >> 9;
+
+ if (op.error)
+ die("write error: %s", bch2_err_str(op.error));
}
static void copy_data(struct bch_fs *c,