qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Manos Pitsidianakis <el13635@mail.ntua.gr>,
	qemu-devel <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
	qemu-block <qemu-block@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] block: add default implementations for bdrv_co_get_block_status()
Date: Mon, 3 Jul 2017 12:51:45 -0500	[thread overview]
Message-ID: <a3c3ad15-ae75-4eae-f74e-72da4e96d980@redhat.com> (raw)
In-Reply-To: <69eaa5de-6e3c-d520-cdc6-35a6298aee94@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]

On 07/03/2017 11:12 AM, Eric Blake wrote:
> On 06/29/2017 01:43 PM, Manos Pitsidianakis wrote:
>> bdrv_co_get_block_status_from_file() and
>> bdrv_co_get_block_status_from_backing() set *file to bs->file and
>> bs->backing respectively, so that bdrv_co_get_block_status() can recurse
>> to them. Future block drivers won't have to duplicate code to implement
>> this.
>>
>> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
>> Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
>> ---
>>  block/blkdebug.c          | 12 +-----------
>>  block/commit.c            | 12 +-----------
>>  block/io.c                | 24 ++++++++++++++++++++++++
>>  block/mirror.c            | 12 +-----------
>>  include/block/block_int.h | 16 ++++++++++++++++
>>  5 files changed, 43 insertions(+), 33 deletions(-)
> 
> My [still-needs-rebasing] part 3 series converting
> bdrv_co_get_block_status to byte-based will be impacted by this, but I'd
> rather yours go in first and I can deal with the rebase fallout.

In fact, my rebase fallout is to completely delete
bdrv_co_get_block_status_from_file().  Why? Because blkdebug is the only
client, but I want to enhance blkdebug to add in-place assert()ions that
the values passed by the block layer are properly aligned to
bs->bl.request_alignment (matching what blkdebug does for read and write
- after all, if a device cannot access smaller than a given alignment
for a read, it should not be able to report different statuses half-way
through that granularity).  However, in-place assertions are no longer
generic, so we no longer have a client of a generic helper function
referring to bs->file.

Which means you are REALLY left only with commit and mirror as the two
functions that have a common implementation of pointing back to backing.

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-07-03 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 18:43 [Qemu-devel] [PATCH v2 0/3] block: block driver callbacks fixes Manos Pitsidianakis
2017-06-29 18:43 ` [Qemu-devel] [PATCH v2 1/3] block: pass bdrv_* methods to bs->file by default Manos Pitsidianakis
2017-07-03 15:56   ` Eric Blake
2017-07-03 18:40     ` Eric Blake
2017-07-06  8:40       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-07-06  9:09   ` Stefan Hajnoczi
2017-06-29 18:43 ` [Qemu-devel] [PATCH v2 2/3] block: use defaults of bdrv_* callbacks in raw Manos Pitsidianakis
2017-07-03 16:05   ` Eric Blake
2017-07-06  9:40   ` Stefan Hajnoczi
2017-06-29 18:43 ` [Qemu-devel] [PATCH v2 3/3] block: add default implementations for bdrv_co_get_block_status() Manos Pitsidianakis
2017-07-03 16:12   ` Eric Blake
2017-07-03 17:51     ` Eric Blake [this message]
2017-07-03 18:24       ` Manos Pitsidianakis
2017-07-03 18:31         ` Eric Blake
2017-07-03 22:22           ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3c3ad15-ae75-4eae-f74e-72da4e96d980@redhat.com \
    --to=eblake@redhat.com \
    --cc=berto@igalia.com \
    --cc=el13635@mail.ntua.gr \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).