qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB*
Date: Wed, 01 Oct 2014 18:50:06 +0200	[thread overview]
Message-ID: <542C30BE.50300@redhat.com> (raw)
In-Reply-To: <1412105144-532-12-git-send-email-armbru@redhat.com>

On 30.09.2014 21:25, Markus Armbruster wrote:
> I'll use BlockDriverAIOCB with block backends shortly, and the name is
> going to fit badly there.  It's a block layer thing anyway, not just a
> block driver thing.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   block-migration.c           |   2 +-
>   block.c                     | 124 ++++++++++++++++++++++----------------------
>   block/archipelago.c         |  10 ++--
>   block/blkdebug.c            |  10 ++--
>   block/blkverify.c           |   8 +--
>   block/curl.c                |   4 +-
>   block/iscsi.c               |   6 +--
>   block/linux-aio.c           |   6 +--
>   block/null.c                |  10 ++--
>   block/qed.c                 |   8 +--
>   block/qed.h                 |   2 +-
>   block/quorum.c              |  36 ++++++-------
>   block/raw-aio.h             |   4 +-
>   block/raw-posix.c           |  16 +++---
>   block/raw-win32.c           |   8 +--
>   block/raw_bsd.c             |   8 +--
>   block/rbd.c                 |  12 ++---
>   block/sheepdog.c            |   4 +-
>   block/win32-aio.c           |   4 +-
>   dma-helpers.c               |  12 ++---
>   hw/block/nvme.h             |   2 +-
>   hw/ide/ahci.h               |   2 +-
>   hw/ide/core.c               |   8 +--
>   hw/ide/internal.h           |   6 +--
>   hw/ppc/mac.h                |   2 +-
>   hw/scsi/scsi-generic.c      |   2 +-
>   include/block/aio.h         |   8 +--
>   include/block/block.h       |  20 +++----
>   include/block/block_int.h   |  10 ++--
>   include/block/thread-pool.h |   2 +-
>   include/hw/scsi/scsi.h      |   2 +-
>   include/sysemu/dma.h        |  26 +++++-----
>   tests/test-thread-pool.c    |   2 +-
>   thread-pool.c               |   8 +--
>   34 files changed, 197 insertions(+), 197 deletions(-)
>

[snip]

> diff --git a/block/archipelago.c b/block/archipelago.c
> index 73d91a4..edbfbb5 100644
> --- a/block/archipelago.c
> +++ b/block/archipelago.c
> @@ -86,7 +86,7 @@ typedef enum {
>   } ARCHIPCmd;
>   
>   typedef struct ArchipelagoAIOCB {
> -    BlockDriverAIOCB common;
> +    BlockAIOCB common;
>       QEMUBH *bh;
>       struct BDRVArchipelagoState *s;
>       QEMUIOVector *qiov;
> @@ -856,7 +856,7 @@ err_exit:
>       return ret;
>   }
>   
> -static BlockDriverAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs,
> +static BlockAIOCB *qemu_archipelago_aio_rw(BlockDriverState *bs,
>                                                    int64_t sector_num,
>                                                    QEMUIOVector *qiov,
>                                                    int nb_sectors,

This breaks the alignment.

[snip]

> diff --git a/block/blkverify.c b/block/blkverify.c
> index 7d64a23..a29ed05 100644
> --- a/block/blkverify.c
> +++ b/block/blkverify.c

[snip]

> -static BlockDriverAIOCB *blkverify_aio_flush(BlockDriverState *bs,
> +static BlockAIOCB *blkverify_aio_flush(BlockDriverState *bs,
>                                                BlockDriverCompletionFunc *cb,
>                                                void *opaque)
>   {

Breaks the alignment.

[snip]

> diff --git a/block/null.c b/block/null.c
> index 8284419..b353a73 100644
> --- a/block/null.c
> +++ b/block/null.c

[snip]

> @@ -94,7 +94,7 @@ static void null_bh_cb(void *opaque)
>       qemu_aio_unref(acb);
>   }
>   
> -static inline BlockDriverAIOCB *null_aio_common(BlockDriverState *bs,
> +static inline BlockAIOCB *null_aio_common(BlockDriverState *bs,
>                                                   BlockDriverCompletionFunc *cb,
>                                                   void *opaque)
>   {

Alignment again (applies to all hunks in block/null.c touching function 
headers).

[snip]

> diff --git a/block/qed.c b/block/qed.c
> index 7f03c26..0382228 100644
> --- a/block/qed.c
> +++ b/block/qed.c
> @@ -1365,7 +1365,7 @@ static void qed_aio_next_io(void *opaque, int ret)
>                         io_fn, acb);
>   }
>   
> -static BlockDriverAIOCB *qed_aio_setup(BlockDriverState *bs,
> +static BlockAIOCB *qed_aio_setup(BlockDriverState *bs,
>                                          int64_t sector_num,
>                                          QEMUIOVector *qiov, int nb_sectors,
>                                          BlockDriverCompletionFunc *cb,

Alignment, for all function header hunks in block/qed.c.

[snip]

> diff --git a/block/rbd.c b/block/rbd.c
> index 96947e3..f44a093 100644
> --- a/block/rbd.c
> +++ b/block/rbd.c

[snip]

> @@ -589,7 +589,7 @@ static int rbd_aio_flush_wrapper(rbd_image_t image,
>   #endif
>   }
>   
> -static BlockDriverAIOCB *rbd_start_aio(BlockDriverState *bs,
> +static BlockAIOCB *rbd_start_aio(BlockDriverState *bs,
>                                          int64_t sector_num,
>                                          QEMUIOVector *qiov,
>                                          int nb_sectors,

Alignment, for all function header hunks in block/rbd.c.

[snip]

> diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
> index 20587b4..8baee16 100644
> --- a/hw/scsi/scsi-generic.c
> +++ b/hw/scsi/scsi-generic.c
> @@ -157,7 +157,7 @@ static void scsi_cancel_io(SCSIRequest *req)
>   
>   static int execute_command(BlockDriverState *bdrv,
>                              SCSIGenericReq *r, int direction,
> -			   BlockDriverCompletionFunc *complete)
> +                           BlockDriverCompletionFunc *complete)
>   {
>       r->io_header.interface_id = 'S';
>       r->io_header.dxfer_direction = direction;

Albeit no functional change, I think this belongs in the next patch.

[snip]

> diff --git a/include/block/block.h b/include/block/block.h
> index 3dc7c56..4349c95 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h

[snip]

> @@ -326,19 +326,19 @@ BlockDriverState *check_to_replace_node(const char *node_name, Error **errp);
>   /* async block I/O */
>   typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector,
>                                        int sector_num);
> -BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
> +BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
>                                    QEMUIOVector *iov, int nb_sectors,
>                                    BlockDriverCompletionFunc *cb, void *opaque);
> -BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
> +BlockAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
>                                     QEMUIOVector *iov, int nb_sectors,
>                                     BlockDriverCompletionFunc *cb, void *opaque);
> -BlockDriverAIOCB *bdrv_aio_flush(BlockDriverState *bs,
> +BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs,
>                                    BlockDriverCompletionFunc *cb, void *opaque);
> -BlockDriverAIOCB *bdrv_aio_discard(BlockDriverState *bs,
> +BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs,
>                                      int64_t sector_num, int nb_sectors,
>                                      BlockDriverCompletionFunc *cb, void *opaque);

Alignment again.

I'm not sure why these alignment breaks appeared in v4; I can't imagine 
they're on purpose, because some hunks do fix up the alignment.

Furthermore, docs/blkdebug.txt mentions BlockDriverAIOCB. You may want 
to replace that occurrence as well. With the alignment issues fixed, the 
scsi-generic.c hunk moved to patch 12 and the two trivial replacements 
in docs/blkdebug.txt:

Reviewed-by: Max Reitz <mreitz@redhat.com>

  reply	other threads:[~2014-10-01 16:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 19:25 [Qemu-devel] [PATCH v4 00/23] Split BlockBackend off BDS with an axe Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 01/23] block: Split bdrv_new_root() off bdrv_new() Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 02/23] block: New BlockBackend Markus Armbruster
2014-10-01 15:27   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 03/23] block: Connect BlockBackend to BlockDriverState Markus Armbruster
2014-10-01 15:34   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 04/23] block: Connect BlockBackend and DriveInfo Markus Armbruster
2014-10-01 15:52   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 05/23] block: Code motion to get rid of stubs/blockdev.c Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 06/23] block: Make BlockBackend own its BlockDriverState Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 07/23] block: Eliminate bdrv_iterate(), use bdrv_next() Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 08/23] block: Eliminate BlockDriverState member device_name[] Markus Armbruster
2014-10-01 16:19   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 09/23] block: Merge BlockBackend and BlockDriverState name spaces Markus Armbruster
2014-10-01 16:20   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo() Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB* Markus Armbruster
2014-10-01 16:50   ` Max Reitz [this message]
2014-10-02  7:03     ` Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 12/23] block: Rename BlockDriverCompletionFunc to BlockCompletionFunc Markus Armbruster
2014-10-01 16:55   ` Max Reitz
2014-10-02  7:12     ` Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 13/23] virtio-blk: Drop redundant VirtIOBlock member conf Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 14/23] virtio-blk: Rename VirtIOBlkConf variables to conf Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 15/23] hw: Convert from BlockDriverState to BlockBackend, mostly Markus Armbruster
2014-10-01 17:09   ` Max Reitz
2014-10-02  7:14     ` Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 16/23] ide: Complete conversion from BlockDriverState to BlockBackend Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 17/23] pc87312: Drop unused members of PC87312State Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 18/23] blockdev: Drop superfluous DriveInfo member id Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 19/23] blockdev: Fix blockdev-add not to create DriveInfo Markus Armbruster
2014-10-01 17:21   ` Max Reitz
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 20/23] block/qapi: Convert qmp_query_block() to BlockBackend Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() " Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 22/23] block: Lift device model API into BlockBackend Markus Armbruster
2014-09-30 19:25 ` [Qemu-devel] [PATCH v4 23/23] block: Make device model's references to BlockBackend strong Markus Armbruster
2014-10-01 17:22   ` Max Reitz

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=542C30BE.50300@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@nodalink.com \
    --cc=kwolf@redhat.com \
    --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).