mirror.c (074a9925e1cfd659d5376dcaccd1436d3840e611) | mirror.c (e12f3784097a26a1ba51be420f41038b4c0ae5d1) |
---|---|
1/* 2 * Image mirroring 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Authors: 7 * Paolo Bonzini <pbonzini@redhat.com> 8 * --- 630 unchanged lines hidden (view full) --- 639 bdrv_get_device_name(job->bs)); 640 return; 641 } 642 643 /* check the target bs is not blocked and block all operations on it */ 644 if (s->replaces) { 645 AioContext *replace_aio_context; 646 | 1/* 2 * Image mirroring 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Authors: 7 * Paolo Bonzini <pbonzini@redhat.com> 8 * --- 630 unchanged lines hidden (view full) --- 639 bdrv_get_device_name(job->bs)); 640 return; 641 } 642 643 /* check the target bs is not blocked and block all operations on it */ 644 if (s->replaces) { 645 AioContext *replace_aio_context; 646 |
647 s->to_replace = check_to_replace_node(s->replaces, &local_err); | 647 s->to_replace = bdrv_find_node(s->replaces); |
648 if (!s->to_replace) { | 648 if (!s->to_replace) { |
649 error_propagate(errp, local_err); | 649 error_setg(errp, "Node name '%s' not found", s->replaces); |
650 return; 651 } 652 653 replace_aio_context = bdrv_get_aio_context(s->to_replace); 654 aio_context_acquire(replace_aio_context); 655 656 error_setg(&s->replace_blocker, 657 "block device is in use by block-job-complete"); --- 175 unchanged lines hidden --- | 650 return; 651 } 652 653 replace_aio_context = bdrv_get_aio_context(s->to_replace); 654 aio_context_acquire(replace_aio_context); 655 656 error_setg(&s->replace_blocker, 657 "block device is in use by block-job-complete"); --- 175 unchanged lines hidden --- |