[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
- [PATCH 8.0 regression 0/8] block: remove bdrv_co_get_geometry coroutines from I/O hot path, Paolo Bonzini, 2023/04/07
- [PATCH 1/8] block: move has_variable_length to BlockLimits, Paolo Bonzini, 2023/04/07
- [PATCH 2/8] block: remove has_variable_length from filters, Paolo Bonzini, 2023/04/07
- [PATCH 3/8] block: refresh bs->total_sectors on reopen, Paolo Bonzini, 2023/04/07
- Re: [PATCH 3/8] block: refresh bs->total_sectors on reopen,
Eric Blake <=
- [PATCH 4/8] block: remove has_variable_length from BlockDriver, Paolo Bonzini, 2023/04/07
- [PATCH 6/8] block-backend: inline bdrv_co_get_geometry, Paolo Bonzini, 2023/04/07
- [PATCH 7/8] block-backend: ignore inserted state in blk_co_nb_sectors, Paolo Bonzini, 2023/04/07
- [PATCH 8/8] block, block-backend: write some hot coroutine wrappers by hand, Paolo Bonzini, 2023/04/07
- [PATCH 5/8] migration/block: replace uses of blk_nb_sectors that do not check result, Paolo Bonzini, 2023/04/07