qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 25/33] block: Make filter drivers use child_of_bds


From: Eric Blake
Subject: Re: [PATCH v2 25/33] block: Make filter drivers use child_of_bds
Date: Wed, 5 Feb 2020 17:02:45 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/4/20 11:08 AM, Max Reitz wrote:
Note that some filters have secondary children, namely blkverify (the
image to be verified) and blklogwrites (the log).  This patch does not
touch those children.

I would have guessed blkdebug; but I guess that's not quite a filter for other reasons, so it gets covered in a later patch.


Note that for blkverify, the filtered child should not be format-probed.
While there is nothing enforcing this here, in practice, it will not be:
blkverify implements .bdrv_file_open.  The block layer ensures (and in
fact, asserts) that BDRV_O_PROTOCOL is set for every BDS whose driver
implements .bdrv_file_open.  This flag will then be bequeathed to
blkverify's children, and they will thus (by default) not be probed
either.

("By default" refers to the fact that blkverify's other child (the
non-filtered one) will have BDRV_O_PROTOCOL force-unset, because that is
what happens for all non-filtered children of non-format drivers.)

Signed-off-by: Max Reitz <address@hidden>
---
  block/blkdebug.c        | 4 +++-
  block/blklogwrites.c    | 3 ++-
  block/blkverify.c       | 4 +++-
  block/copy-on-read.c    | 5 +++--
  block/filter-compress.c | 5 +++--
  block/replication.c     | 3 ++-
  block/throttle.c        | 5 +++--
  7 files changed, 19 insertions(+), 10 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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