Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block/blkio: Tolerate device size changes
Some libblkio drivers may be able to work with regular files (e.g., io_uring) or otherwise resizable devices. Conservatively set BlockDriver::has_variable_length to true to ensure bdrv_nb_sectors() always gives up-to-date results. Also implement BlockDriver::bdrv_co_truncate for the case where no preallocation is needed and the device already has a size compatible with what was requested. Signed-off-by: Alberto Faria <afaria@redhat.com> Message-id: 20221029122031.975273-1-afaria@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
- Loading branch information