aboutsummaryrefslogtreecommitdiff
path: root/block/mirror.c
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2015-08-14 09:41:30 -0400
committerJeff Cody <jcody@redhat.com>2015-08-14 09:41:30 -0400
commitd90dedfcd5b9faad105bf28b718c9477d8467e77 (patch)
tree4eeed61720a9cc4dcd6ab72529f67e3b805f6b5b /block/mirror.c
parentbe1f13ac9d9fc21908975460652a72f5f0c018c5 (diff)
parentcae98cb87d269c33d23b2bccd79bb8d99a60d811 (diff)
Merge branch 'block-next' into HEAD
Diffstat (limited to 'block/mirror.c')
-rw-r--r--block/mirror.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/mirror.c b/block/mirror.c
index fc4d8f561e..0841964e97 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -245,6 +245,10 @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s)
trace_mirror_break_buf_busy(s, nb_chunks, s->in_flight);
break;
}
+ if (IOV_MAX < nb_chunks + added_chunks) {
+ trace_mirror_break_iov_max(s, nb_chunks, added_chunks);
+ break;
+ }
/* We have enough free space to copy these sectors. */
bitmap_set(s->in_flight_bitmap, next_chunk, added_chunks);