[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/12] block: Introduce BlockBackendPublic
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 03/12] block: Introduce BlockBackendPublic |
Date: |
Thu, 24 Mar 2016 09:06:19 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 23.03.2016 um 22:35 hat Eric Blake geschrieben:
> On 03/23/2016 03:09 AM, Kevin Wolf wrote:
> >>> +++ b/block/block-backend.c
> >>> @@ -33,6 +33,7 @@ struct BlockBackend {
> >>> DriveInfo *legacy_dinfo; /* null unless created by drive_new() */
> >>> QTAILQ_ENTRY(BlockBackend) link; /* for block_backends */
> >>> QTAILQ_ENTRY(BlockBackend) monitor_link; /* for
> >>> monitor_block_backends */
> >>> + BlockBackendPublic public;
> >>
> >> Any reason to not put the public struct at offset 0?
> >
> > No, but also no reason to put it there. :-)
>
> True.
>
> >>> +typedef struct BlockBackendPublic {
> >>> +} BlockBackendPublic;
> >>
> >> No fields? So really all we need this for is so that we can have an
> >> address of a member of the larger struct, so that we can do list
> >> operations based on that address?
> >
> > Well, a list still needs a QLIST_ENTRY, otherwise I could have directly
> > used BlockBackend. I just tried to keep the introduction of .public
> > separate from the addition of a specific list.
> >
> > I think it's strictly speaking invalid C to have an empty struct, but
> > gcc compiles it and so I thought it should be acceptable to have one for
> > a single commit until something is added there.
>
> clang gripes; see commit 83ecb22ba.
>
> But breaking bisection for one patch on clang-only is different than
> breaking bisection on all compilers, so up to you what you want to do
> about it.
We can always have an int dummy in there...
Kevin
pgpHTAGCe4hbG.pgp
Description: PGP signature
[Qemu-devel] [PATCH 04/12] block: throttle-groups: Use BlockBackend pointers internally, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 08/12] block: Move I/O throttling configuration functions to BlockBackend, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 11/12] block: Decouple throttling from BlockDriverState, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 05/12] block: Convert throttle_group_get_name() to BlockBackend, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 07/12] block: Move actual I/O throttling to BlockBackend, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 10/12] block: Drain throttling queue with BdrvChild callback, Kevin Wolf, 2016/03/22
[Qemu-devel] [PATCH 06/12] block: Move throttling fields from BDS to BB, Kevin Wolf, 2016/03/22