diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-03-01 01:45:15 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-03-08 02:34:33 -0900 |
commit | 06b73dbd7ffc0296b2ecea8d3bc55bfeb72d7f2a (patch) | |
tree | 1ba37985a18eb2d9a9616ee160c82339e23e2160 /linux/blkdev.c | |
parent | 171ee48e57be78f4e95954c99851553fa523bf91 (diff) |
cmd_migratedisk-format-changes
Diffstat (limited to 'linux/blkdev.c')
-rw-r--r-- | linux/blkdev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/blkdev.c b/linux/blkdev.c index 0bae9b0..f50a9c7 100644 --- a/linux/blkdev.c +++ b/linux/blkdev.c @@ -49,6 +49,12 @@ int submit_bio_wait(struct bio *bio) BUG(); } + if (ret != bio->bi_iter.bi_size) { + fprintf(stderr, "IO error: %i (%s)\n", + ret, strerror(errno)); + return -EIO; + } + if (bio->bi_opf & REQ_FUA) fdatasync(bio->bi_bdev->bd_fd); |