block/nfs: do not poll within a coroutine
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 12 Apr 2023 11:26:06 +0000 (13:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 12 Apr 2023 16:26:51 +0000 (18:26 +0200)
commit3fe64abcde55cf6f4ea5883106301baad219a7cc
tree0818e509bbc09b111ff5809d37850312712666a7
parentabb02ce0e76a8e00026699a863ab2d11d88f56d4
block/nfs: do not poll within a coroutine

Since the former nfs_get_allocated_file_size is now a coroutine
function, it must suspend rather than poll.  Switch BDRV_POLL_WHILE()
to a qemu_coroutine_yield() loop and schedule nfs_co_generic_bh_cb()
in place of the call to bdrv_wakeup().

Fixes: 82618d7bc341 ("block: Convert bdrv_get_allocated_file_size() to co_wrapper", 2023-02-01)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230412112606.80983-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/nfs.c