On 07/05/2017 05:08 PM, Eric Blake wrote:
> bdrv_is_allocated_above() was relying on intermediate->total_sectors,
> which is a field that can have stale contents depending on the value
> of intermediate->has_variable_length.  An audit shows that we are safe
> (we were first calling through bdrv_co_get_block_status() which in
> turn calls bdrv_nb_sectors() and therefore just refreshed the current
> length), but it's nicer to favor our accessor functions to avoid having
> to repeat such an audit, even if it means refresh_total_sectors() is
> called more frequently.
> 
> Suggested-by: John Snow <[email protected]>
> Signed-off-by: Eric Blake <[email protected]>
> Reviewed-by: Manos Pitsidianakis <[email protected]>
> Reviewed-by: Jeff Cody <[email protected]>

Reviewed-by: John Snow <[email protected]>

Reply via email to