qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/8] block: refresh bs->total_sectors on reopen


From: Eric Blake
Subject: Re: [PATCH 3/8] block: refresh bs->total_sectors on reopen
Date: Fri, 7 Apr 2023 14:42:23 -0500
User-agent: NeoMutt/20230322

On Fri, Apr 07, 2023 at 05:32:58PM +0200, Paolo Bonzini wrote:
> After reopening a BlockDriverState, it's possible that the size of the
> underlying file has changed.  This for example is covered by test 171.
> 
> Right now, this is handled by the raw driver's has_variable_length = true
> setting.  Since this will be removed by the next patch, handle it on
> reopen instead, together with the existing bdrv_refresh_limits.

Makes sense.  Normally, when exposing a host image to a guest, you
don't expect the image to be changing outside of qemu's control; there
are exceptions (like dealing with ENOSPC), but they are generally
limited to adding more space (and not modifying existing contents or
shrinking the volume).  Detecting growth at reopen seems reasonable,
and like it will cut out on some of the frequency of checks we are
currently doing even when most see no change.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]