[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 1/9] block: Add COR filter driver
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v2 1/9] block: Add COR filter driver |
Date: |
Wed, 25 Apr 2018 13:35:07 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 25 Apr 2018 01:18:03 PM CEST, Max Reitz wrote:
>>> +#define PERM_PASSTHROUGH (BLK_PERM_CONSISTENT_READ \
>>> + | BLK_PERM_WRITE \
>>> + | BLK_PERM_RESIZE)
>>> +#define PERM_UNCHANGED (BLK_PERM_ALL & ~PERM_PASSTHROUGH)
>>> +
>>> +static void cor_child_perm(BlockDriverState *bs, BdrvChild *c,
>>> + const BdrvChildRole *role,
>>> + BlockReopenQueue *reopen_queue,
>>> + uint64_t perm, uint64_t shared,
>>> + uint64_t *nperm, uint64_t *nshared)
>>> +{
>>> + if (c == NULL) {
>>> + *nperm = (perm & PERM_PASSTHROUGH) | BLK_PERM_WRITE_UNCHANGED;
>>> + *nshared = (shared & PERM_PASSTHROUGH) | PERM_UNCHANGED;
>>> + return;
>>> + }
>>> +
>>> + *nperm = (perm & PERM_PASSTHROUGH) |
>>> + (c->perm & PERM_UNCHANGED);
>>
>> I admit I'm not completely familiar with this, but don't you need to
>> add BLK_PERM_WRITE_UNCHANGED to *nperm ?
>
> As long as it's requested in when the child is attached (which it is
> in the "c == NULL" case), it should be part of c->perm then.
>
> (And since PERM_PASSTHROUGH does not contain WRITE_UNCHANGED, it is
> part of PERM_UNCHANGED.)
I see, thanks.
Reviewed-by: Alberto Garcia <address@hidden>
Berto
- [Qemu-block] [PATCH v2 0/9] block: Add COR filter driver, Max Reitz, 2018/04/21
- [Qemu-block] [PATCH v2 2/9] block: BLK_PERM_WRITE includes ..._UNCHANGED, Max Reitz, 2018/04/21
- [Qemu-block] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Max Reitz, 2018/04/21
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Eric Blake, 2018/04/25
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Max Reitz, 2018/04/25
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Eric Blake, 2018/04/25
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Kevin Wolf, 2018/04/26
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Max Reitz, 2018/04/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/9] block: Add BDRV_REQ_WRITE_UNCHANGED flag, Kevin Wolf, 2018/04/30
[Qemu-block] [PATCH v2 4/9] block: Set BDRV_REQ_WRITE_UNCHANGED for COR writes, Max Reitz, 2018/04/21
[Qemu-block] [PATCH v2 5/9] block/quorum: Support BDRV_REQ_WRITE_UNCHANGED, Max Reitz, 2018/04/21