Message ID | 20240805210851.314076-3-kwolf@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,01/13] qapi-block-core: Clean up blockdev-snapshot-internal-sync doc | expand |
diff --git a/block/block-copy.c b/block/block-copy.c index 7e3b378528..cc618e4561 100644 --- a/block/block-copy.c +++ b/block/block-copy.c @@ -595,7 +595,9 @@ static coroutine_fn int block_copy_task_entry(AioTask *task) if (s->discard_source && ret == 0) { int64_t nbytes = MIN(t->req.offset + t->req.bytes, s->len) - t->req.offset; - bdrv_co_pdiscard(s->source, t->req.offset, nbytes); + WITH_GRAPH_RDLOCK_GUARD() { + bdrv_co_pdiscard(s->source, t->req.offset, nbytes); + } } return ret;