[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support inc
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base |
Date: |
Wed, 23 Sep 2020 19:47:54 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 23 Sep 2020 07:11:57 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
>> BlockDriverState *last_bs = include_base ? base : backing_bs(base);
>
> hmm, in case when include_base is false, last bs is not
> backing_bs(base) but the parent of base.
Oops, yes, it should be the other way around %-)
>> But why do we need include_base at all? Can't the caller just pass
>> backing_bs(base) instead? I'm talking also about the existing case of
>> bdrv_is_allocated_above().
>
> include_base was introduced for the case when caller doesn't own
> backing_bs(base), and therefore shouldn't do operations that may yield
> (block_status can) dependent on backing_bs(base). In particular, in
> block stream, where link to base is not frozen.
You're right, thanks!
Berto
- [PATCH v6 0/5] fix & merge block_status_above and is_allocated_above, Vladimir Sementsov-Ogievskiy, 2020/09/16
- [PATCH v6 4/5] block/io: fix bdrv_is_allocated_above, Vladimir Sementsov-Ogievskiy, 2020/09/16
- [PATCH v6 1/5] block/io: fix bdrv_co_block_status_above, Vladimir Sementsov-Ogievskiy, 2020/09/16
- [PATCH v6 5/5] iotests: add commit top->base cases to 274, Vladimir Sementsov-Ogievskiy, 2020/09/16
- [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base, Vladimir Sementsov-Ogievskiy, 2020/09/16
- Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base, Alberto Garcia, 2020/09/23
- [PATCH v6 3/5] block/io: bdrv_common_block_status_above: support bs == base, Vladimir Sementsov-Ogievskiy, 2020/09/16