Message ID | 20200707163504.194740-2-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
Series | Block layer patches | expand |
diff --git a/qemu-img.c b/qemu-img.c index bdb9f6aa46..74946f81ca 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3217,12 +3217,9 @@ static int img_map(int argc, char **argv) curr.start = start_offset; while (curr.start + curr.length < length) { int64_t offset = curr.start + curr.length; - int64_t n; + int64_t n = length - offset; - /* Probe up to 1 GiB at a time. */ - n = MIN(1 * GiB, length - offset); ret = get_block_status(bs, offset, n, &next); - if (ret < 0) { error_report("Could not read file metadata: %s", strerror(-ret)); goto out;