[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH v4 20/21] block: Minimize raw use o

From: John Snow
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v4 20/21] block: Minimize raw use of bds->total_sectors
Date: Wed, 5 Jul 2017 20:23:46 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

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 <address@hidden>
> Signed-off-by: Eric Blake <address@hidden>
> Reviewed-by: Manos Pitsidianakis <address@hidden>
> Reviewed-by: Jeff Cody <address@hidden>

Reviewed-by: John Snow <address@hidden>

reply via email to

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