From: Max Reitz <mreitz@redhat.com>
To: Thomas Huth <thuth@linux.vnet.ibm.com>,
qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 4/4] block: Remove unused functions
Date: Mon, 16 Feb 2015 17:26:56 -0500 [thread overview]
Message-ID: <54E26EB0.70308@redhat.com> (raw)
In-Reply-To: <1424122891-9390-5-git-send-email-thuth@linux.vnet.ibm.com>
On 2015-02-16 at 16:41, Thomas Huth wrote:
> qemu_try_blockalign0() and nbd_export_close_all() are not
> used anymore and thus can be removed.
>
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block.c | 11 -----------
> include/block/block.h | 1 -
> include/block/nbd.h | 1 -
> nbd.c | 9 ---------
> 4 files changed, 0 insertions(+), 22 deletions(-)
NACK, I'm using nbd_export_close_all() in my "block: Rework
bdrv_close_all()" series.
I'm not so sure about qemu_try_blockalign0(); it has never been used,
but I introduced it because we have qemu_blockalign(),
qemu_try_blockalign(), and qemu_blockalign0() (the latter of which I
introduced along with qemu_try_blockalign0(), and this function is used).
So I'd be fine with removing qemu_try_blockalign0() again, but I don't
really see the point in doing so. It is not a function that is per-se
deprecated or something, quite the opposite, actually. If people can
make use of that function, they should most certainly do so.
Max
> diff --git a/block.c b/block.c
> index 210fd5f..2128f82 100644
> --- a/block.c
> +++ b/block.c
> @@ -5335,17 +5335,6 @@ void *qemu_try_blockalign(BlockDriverState *bs, size_t size)
> return qemu_try_memalign(align, size);
> }
>
> -void *qemu_try_blockalign0(BlockDriverState *bs, size_t size)
> -{
> - void *mem = qemu_try_blockalign(bs, size);
> -
> - if (mem) {
> - memset(mem, 0, size);
> - }
> -
> - return mem;
> -}
> -
> /*
> * Check if all memory in this vector is sector aligned.
> */
> diff --git a/include/block/block.h b/include/block/block.h
> index 321295e..7ee9ab3 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -433,7 +433,6 @@ void bdrv_set_guest_block_size(BlockDriverState *bs, int align);
> void *qemu_blockalign(BlockDriverState *bs, size_t size);
> void *qemu_blockalign0(BlockDriverState *bs, size_t size);
> void *qemu_try_blockalign(BlockDriverState *bs, size_t size);
> -void *qemu_try_blockalign0(BlockDriverState *bs, size_t size);
> bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov);
>
> struct HBitmapIter;
> diff --git a/include/block/nbd.h b/include/block/nbd.h
> index b759595..fccef2d 100644
> --- a/include/block/nbd.h
> +++ b/include/block/nbd.h
> @@ -95,7 +95,6 @@ BlockBackend *nbd_export_get_blockdev(NBDExport *exp);
>
> NBDExport *nbd_export_find(const char *name);
> void nbd_export_set_name(NBDExport *exp, const char *name);
> -void nbd_export_close_all(void);
>
> NBDClient *nbd_client_new(NBDExport *exp, int csock,
> void (*close)(NBDClient *));
> diff --git a/nbd.c b/nbd.c
> index e56afbc..634bf84 100644
> --- a/nbd.c
> +++ b/nbd.c
> @@ -1067,15 +1067,6 @@ BlockBackend *nbd_export_get_blockdev(NBDExport *exp)
> return exp->blk;
> }
>
> -void nbd_export_close_all(void)
> -{
> - NBDExport *exp, *next;
> -
> - QTAILQ_FOREACH_SAFE(exp, &exports, next, next) {
> - nbd_export_close(exp);
> - }
> -}
> -
> static ssize_t nbd_co_send_reply(NBDRequest *req, struct nbd_reply *reply,
> int len)
> {
WARNING: multiple messages have this Message-ID (diff)
From: Max Reitz <mreitz@redhat.com>
To: Thomas Huth <thuth@linux.vnet.ibm.com>,
qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] block: Remove unused functions
Date: Mon, 16 Feb 2015 17:26:56 -0500 [thread overview]
Message-ID: <54E26EB0.70308@redhat.com> (raw)
In-Reply-To: <1424122891-9390-5-git-send-email-thuth@linux.vnet.ibm.com>
On 2015-02-16 at 16:41, Thomas Huth wrote:
> qemu_try_blockalign0() and nbd_export_close_all() are not
> used anymore and thus can be removed.
>
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block.c | 11 -----------
> include/block/block.h | 1 -
> include/block/nbd.h | 1 -
> nbd.c | 9 ---------
> 4 files changed, 0 insertions(+), 22 deletions(-)
NACK, I'm using nbd_export_close_all() in my "block: Rework
bdrv_close_all()" series.
I'm not so sure about qemu_try_blockalign0(); it has never been used,
but I introduced it because we have qemu_blockalign(),
qemu_try_blockalign(), and qemu_blockalign0() (the latter of which I
introduced along with qemu_try_blockalign0(), and this function is used).
So I'd be fine with removing qemu_try_blockalign0() again, but I don't
really see the point in doing so. It is not a function that is per-se
deprecated or something, quite the opposite, actually. If people can
make use of that function, they should most certainly do so.
Max
> diff --git a/block.c b/block.c
> index 210fd5f..2128f82 100644
> --- a/block.c
> +++ b/block.c
> @@ -5335,17 +5335,6 @@ void *qemu_try_blockalign(BlockDriverState *bs, size_t size)
> return qemu_try_memalign(align, size);
> }
>
> -void *qemu_try_blockalign0(BlockDriverState *bs, size_t size)
> -{
> - void *mem = qemu_try_blockalign(bs, size);
> -
> - if (mem) {
> - memset(mem, 0, size);
> - }
> -
> - return mem;
> -}
> -
> /*
> * Check if all memory in this vector is sector aligned.
> */
> diff --git a/include/block/block.h b/include/block/block.h
> index 321295e..7ee9ab3 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -433,7 +433,6 @@ void bdrv_set_guest_block_size(BlockDriverState *bs, int align);
> void *qemu_blockalign(BlockDriverState *bs, size_t size);
> void *qemu_blockalign0(BlockDriverState *bs, size_t size);
> void *qemu_try_blockalign(BlockDriverState *bs, size_t size);
> -void *qemu_try_blockalign0(BlockDriverState *bs, size_t size);
> bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov);
>
> struct HBitmapIter;
> diff --git a/include/block/nbd.h b/include/block/nbd.h
> index b759595..fccef2d 100644
> --- a/include/block/nbd.h
> +++ b/include/block/nbd.h
> @@ -95,7 +95,6 @@ BlockBackend *nbd_export_get_blockdev(NBDExport *exp);
>
> NBDExport *nbd_export_find(const char *name);
> void nbd_export_set_name(NBDExport *exp, const char *name);
> -void nbd_export_close_all(void);
>
> NBDClient *nbd_client_new(NBDExport *exp, int csock,
> void (*close)(NBDClient *));
> diff --git a/nbd.c b/nbd.c
> index e56afbc..634bf84 100644
> --- a/nbd.c
> +++ b/nbd.c
> @@ -1067,15 +1067,6 @@ BlockBackend *nbd_export_get_blockdev(NBDExport *exp)
> return exp->blk;
> }
>
> -void nbd_export_close_all(void)
> -{
> - NBDExport *exp, *next;
> -
> - QTAILQ_FOREACH_SAFE(exp, &exports, next, next) {
> - nbd_export_close(exp);
> - }
> -}
> -
> static ssize_t nbd_co_send_reply(NBDRequest *req, struct nbd_reply *reply,
> int len)
> {
next prev parent reply other threads:[~2015-02-16 22:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 21:41 [Qemu-trivial] [PATCH 0/4] Remove unused functions Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 1/4] migration: " Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 2/4] ui/console: Removed " Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-17 8:21 ` [Qemu-trivial] " Gerd Hoffmann
2015-02-17 8:21 ` [Qemu-devel] " Gerd Hoffmann
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 3/4] util: Remove " Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-17 8:55 ` [Qemu-trivial] " Markus Armbruster
2015-02-17 8:55 ` Markus Armbruster
2015-02-17 9:52 ` [Qemu-trivial] " Thomas Huth
2015-02-17 9:52 ` Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 4/4] block: " Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-16 22:26 ` Max Reitz [this message]
2015-02-16 22:26 ` Max Reitz
2015-02-17 8:15 ` [Qemu-trivial] " Thomas Huth
2015-02-17 8:15 ` Thomas Huth
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=54E26EB0.70308@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@linux.vnet.ibm.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 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.