aboutsummaryrefslogtreecommitdiff
path: root/block/stream.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2020-10-27 00:05:53 -0500
committerEric Blake <eblake@redhat.com>2020-10-30 15:21:23 -0500
commita92b1b065eed385d9077be735eb8e92f5a6e150a (patch)
tree7c08e4904f939ec6e4ba8ffe1cd0d0a35daab1bf /block/stream.c
parent3b1f244c59b7045680e615d50dc444a316abd891 (diff)
block: Return depth level during bdrv_is_allocated_above
When checking for allocation across a chain, it's already easy to count the depth within the chain at which the allocation is found. Instead of throwing that information away, return it to the caller. Existing callers only cared about allocated/non-allocated, but having a depth available will be used by NBD in the next patch. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20201027050556.269064-9-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> [eblake: rebase to master] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block/stream.c')
-rw-r--r--block/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/stream.c b/block/stream.c
index 8ce6729a33..236384f2f7 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -167,7 +167,7 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
n = len - offset;
}
- copy = (ret == 1);
+ copy = (ret > 0);
}
trace_stream_one_iteration(s, offset, n, ret);
if (copy) {