Re: [PATCH v2 12/17] virshStreamSkip: Emulate skip for block devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 07, 2020 at 21:46:30 +0200, Michal Privoznik wrote:
> This callback is called when the server sends us STREAM_HOLE
> meaning there is no real data, only zeroes. For regular files
> we would just seek() beyond EOF and ftruncate() to create the
> hole. But for block devices this won't work. Not only we can't
> seek() beyond EOF, and ftruncate() will fail, this approach won't
> fill the device with zeroes. We have to do it manually.
> 
> Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1852528
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  tools/virsh-util.c | 30 ++++++++++++++++++++++++++----
>  1 file changed, 26 insertions(+), 4 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux