block: Convert bdrv_get_allocated_file_size() to co_wrapper
bdrv_get_allocated_file_size() is categorized as an I/O function, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since it traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into a co_wrapper to move the actual function into a coroutine where the lock can be taken. Signed-off-by:Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230113204212.359076-10-kwolf@redhat.com> Reviewed-by:
Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Showing
- block.c 6 additions, 6 deletionsblock.c
- block/file-posix.c 5 additions, 9 deletionsblock/file-posix.c
- block/file-win32.c 4 additions, 6 deletionsblock/file-win32.c
- block/gluster.c 6 additions, 5 deletionsblock/gluster.c
- block/nfs.c 2 additions, 2 deletionsblock/nfs.c
- block/null.c 4 additions, 3 deletionsblock/null.c
- block/qcow2-refcount.c 1 addition, 1 deletionblock/qcow2-refcount.c
- block/vmdk.c 5 additions, 4 deletionsblock/vmdk.c
- include/block/block-io.h 3 additions, 1 deletioninclude/block/block-io.h
- include/block/block_int-common.h 3 additions, 1 deletioninclude/block/block_int-common.h
Loading
Please register or sign in to comment