qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, kwolf@redhat.omc
Subject: Re: [PATCH 3/5] block: reduce files included by block/aio.h
Date: Thu, 4 Dec 2025 18:03:27 +0100	[thread overview]
Message-ID: <38f73101-4f2d-4e62-8ea3-fc42cc90e8f3@linaro.org> (raw)
In-Reply-To: <19f01d31-01f5-458e-873b-4859e2f8b3d9@redhat.com>

On 4/12/25 10:25, Paolo Bonzini wrote:
> On 12/4/25 09:35, Philippe Mathieu-Daudé wrote:
>> On 3/12/25 19:51, Paolo Bonzini wrote:
>>> Avoid including all of qdev everywhere (the hw/core/qdev.h header in 
>>> fact
>>> brings in a lot more headers too), instead declare a couple structs for
>>> which only a pointer type is needed.
>>>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>   include/block/aio.h                |  7 +++----
>>>   include/block/block-copy.h         |  1 +
>>>   include/block/block-global-state.h |  1 +
>>>   include/block/block-io.h           |  1 +
>>>   include/block/dirty-bitmap.h       |  1 +
>>>   include/hw/core/qdev.h             |  6 +-----
>>>   include/qemu/job.h                 |  1 +
>>>   include/qemu/main-loop.h           |  2 +-
>>>   include/qemu/mem-reentrancy.h      | 10 ++++++++++
>>>   net/net.c                          |  1 +
>>>   util/async.c                       |  1 +
>>>   11 files changed, 22 insertions(+), 10 deletions(-)
>>>   create mode 100644 include/qemu/mem-reentrancy.h
>>>
>>> diff --git a/include/block/aio.h b/include/block/aio.h
>>> index 59c56d695ee..8cca2360d1a 100644
>>> --- a/include/block/aio.h
>>> +++ b/include/block/aio.h
>>> @@ -23,9 +23,8 @@
>>>   #include "qemu/lockcnt.h"
>>>   #include "qemu/thread.h"
>>>   #include "qemu/timer.h"
>>> -#include "block/graph-lock.h"
>>> -#include "hw/core/qdev.h"
>>> +struct MemReentrancyGuard;
>>>   typedef struct AioHandler AioHandler;
>>>   typedef QLIST_HEAD(, AioHandler) AioHandlerList;
>>> @@ -211,7 +210,7 @@ struct AioContext {
>>>        * of nodes and edges from block graph while some
>>>        * other thread is traversing it.
>>>        */
>>> -    BdrvGraphRWlock *bdrv_graph;
>>> +    struct BdrvGraphRWlock *bdrv_graph;
>>>       /* The list of registered AIO handlers.  Protected by ctx- 
>>> >list_lock. */
>>>       AioHandlerList aio_handlers;
>>> @@ -393,7 +392,7 @@ void aio_bh_schedule_oneshot_full(AioContext 
>>> *ctx, QEMUBHFunc *cb, void *opaque,
>>>    * device-reentrancy issues
>>>    */
>>>   QEMUBH *aio_bh_new_full(AioContext *ctx, QEMUBHFunc *cb, void *opaque,
>>> -                        const char *name, MemReentrancyGuard 
>>> *reentrancy_guard);
>>> +                        const char *name, struct MemReentrancyGuard 
>>> *reentrancy_guard);
>>
>> I suppose these changes were before you move the declarations to their
>> own "qemu/mem-reentrancy.h" header?
> 
> Yes, but also qemu/mem-reentrancy.h is not included here.

We want to also include it instead, right? (No need to forward declare)



  reply	other threads:[~2025-12-04 17:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 18:51 [PATCH 0/5] block: move AioContext and AIOCB out of include/block/ Paolo Bonzini
2025-12-03 18:51 ` [PATCH 1/5] hw: add missing includes hidden by block/aio.h Paolo Bonzini
2025-12-04  8:32   ` Philippe Mathieu-Daudé
2025-12-03 18:51 ` [PATCH 2/5] block: extract include/qemu/aiocb.h out of include/block/aio.h Paolo Bonzini
2025-12-04  8:33   ` Philippe Mathieu-Daudé
2025-12-03 18:51 ` [PATCH 3/5] block: reduce files included by block/aio.h Paolo Bonzini
2025-12-04  8:35   ` Philippe Mathieu-Daudé
2025-12-04  9:25     ` Paolo Bonzini
2025-12-04 17:03       ` Philippe Mathieu-Daudé [this message]
2025-12-04 17:46         ` Paolo Bonzini
2025-12-03 18:51 ` [PATCH 4/5] block: rename block/aio.h to qemu/aio.h Paolo Bonzini
2025-12-04  8:35   ` Philippe Mathieu-Daudé
2025-12-03 18:51 ` [PATCH 5/5] block: rename block/aio-wait.h to qemu/aio-wait.h Paolo Bonzini
2025-12-04  8:36   ` Philippe Mathieu-Daudé

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=38f73101-4f2d-4e62-8ea3-fc42cc90e8f3@linaro.org \
    --to=philmd@linaro.org \
    --cc=kwolf@redhat.omc \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).