All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v3 0/5] introduce QArray
Date: Tue, 31 Aug 2021 13:58:02 +0200	[thread overview]
Message-ID: <20210831135802.349fb447@bahia.lan> (raw)
In-Reply-To: <cover.1629982046.git.qemu_oss@crudebyte.com>

On Thu, 26 Aug 2021 14:47:26 +0200
Christian Schoenebeck <qemu_oss@crudebyte.com> wrote:

> Patches 1 and 2 introduce include/qemu/qarray.h which implements a deep auto
> free mechanism for arrays. See commit log of patch 1 for a detailed
> explanation and motivation for introducing QArray.
> 
> Patches 3..5 are provided (e.g. as example) for 9p being the first user of
> this new QArray API. These particular patches 3..5 are rebased on my
> current 9p queue: https://github.com/cschoenebeck/qemu/commits/9p.next
> which are basically just the following two queued patches:
> 

This looks nice indeed but I have the impression the same could be
achieved using glib's g_autoptr framework with less code being added
to QEMU (at the cost of being less generic maybe).

Anyway, we should likely sort out the SEGV issue you're hitting
before going forward with supplementary changes in v9fs_walk().

> https://github.com/cschoenebeck/qemu/commit/7772715d43908235940f5b7dec68d0458b1ccdf4
> https://github.com/cschoenebeck/qemu/commit/838b55e392ea7d52e714fdba1db777f658aee2cc
> 
> v2 -> v3:
> 
>     * Refactor QArrayRef() -> QARRAY_REF() [patch 1], [patch 5].
> 
>     * Commit log: Add more thorough explanation for the motivation of QArray,
>       along with example for advantage over GArray [patch 1].
> 
>     * Commit log: Add reason for using MIT license for qarray.h instead of
>       the standard QEMU license GPLv2+ [patch 1].
> 
>     * API doc comments: use 'size_t' type consistently in API doc example
>       code [patch 1].
> 
> v1 -> v2:
> 
>     * Minor API comment changes [patch 1].
> 
>     * Perform strong type check by using __builtin_types_compatible_p()
>       instead of a weak check using sizeof() [patch 2].
> 
> Christian Schoenebeck (5):
>   qemu/qarray.h: introduce QArray
>   qemu/qarray.h: check scalar type in QARRAY_CREATE()
>   9pfs: make V9fsString usable via QArray API
>   9pfs: make V9fsPath usable via QArray API
>   9pfs: use QArray in v9fs_walk()
> 
>  fsdev/9p-marshal.c    |   2 +
>  fsdev/9p-marshal.h    |   3 +
>  fsdev/file-op-9p.h    |   2 +
>  hw/9pfs/9p.c          |  19 ++---
>  include/qemu/qarray.h | 160 ++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 174 insertions(+), 12 deletions(-)
>  create mode 100644 include/qemu/qarray.h
> 



  parent reply	other threads:[~2021-08-31 11:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 12:47 [PATCH v3 0/5] introduce QArray Christian Schoenebeck
2021-08-26 12:30 ` [PATCH v3 1/5] qemu/qarray.h: " Christian Schoenebeck
2021-08-26 12:31 ` [PATCH v3 2/5] qemu/qarray.h: check scalar type in QARRAY_CREATE() Christian Schoenebeck
2021-08-26 12:31 ` [PATCH v3 3/5] 9pfs: make V9fsString usable via QArray API Christian Schoenebeck
2021-08-26 12:31 ` [PATCH v3 4/5] 9pfs: make V9fsPath " Christian Schoenebeck
2021-08-26 12:32 ` [PATCH v3 5/5] 9pfs: use QArray in v9fs_walk() Christian Schoenebeck
2021-08-31 11:58 ` Greg Kurz [this message]
2021-08-31 12:25   ` [PATCH v3 0/5] introduce QArray Christian Schoenebeck
2021-09-27 10:35     ` Christian Schoenebeck
2021-09-27 10:59       ` Greg Kurz
2021-09-28 12:25         ` Christian Schoenebeck
2021-09-28 13:37           ` Alex Bennée
2021-09-28 16:37             ` Christian Schoenebeck
2021-09-28 14:17           ` Daniel P. Berrangé

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=20210831135802.349fb447@bahia.lan \
    --to=groug@kaod.org \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.