|
@@ -195,14 +195,15 @@ static bool qed_is_image_size_valid(uint64_t image_size, uint32_t cluster_size,
|
|
|
*
|
|
|
* The string is NUL-terminated.
|
|
|
*/
|
|
|
-static int qed_read_string(BdrvChild *file, uint64_t offset, size_t n,
|
|
|
- char *buf, size_t buflen)
|
|
|
+static int coroutine_fn GRAPH_RDLOCK
|
|
|
+qed_read_string(BdrvChild *file, uint64_t offset,
|
|
|
+ size_t n, char *buf, size_t buflen)
|
|
|
{
|
|
|
int ret;
|
|
|
if (n >= buflen) {
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
- ret = bdrv_pread(file, offset, n, buf, 0);
|
|
|
+ ret = bdrv_co_pread(file, offset, n, buf, 0);
|
|
|
if (ret < 0) {
|
|
|
return ret;
|
|
|
}
|