qemu_try_blockalign0() and nbd_export_close_all() are not used anymore and thus can be removed.
Signed-off-by: Thomas Huth <th...@linux.vnet.ibm.com> Cc: Kevin Wolf <kw...@redhat.com> Cc: Stefan Hajnoczi <stefa...@redhat.com> Cc: Paolo Bonzini <pbonz...@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(-) 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) { -- 1.7.1