[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 08/32] qcow2: Remove BDS parameter from qcow2_cac
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v2 08/32] qcow2: Remove BDS parameter from qcow2_cache_destroy() |
Date: |
Fri, 15 Dec 2017 13:53:36 +0100 |
This function was never using the BlockDriverState parameter so it can
be safely removed.
Signed-off-by: Alberto Garcia <address@hidden>
---
block/qcow2-cache.c | 2 +-
block/qcow2.c | 16 ++++++++--------
block/qcow2.h | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index 10f0b7fa87..49f43d304a 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -142,7 +142,7 @@ Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int
num_tables)
return c;
}
-int qcow2_cache_destroy(BlockDriverState *bs, Qcow2Cache *c)
+int qcow2_cache_destroy(Qcow2Cache *c)
{
int i;
diff --git a/block/qcow2.c b/block/qcow2.c
index 1914a940e5..32a2fb15db 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1034,10 +1034,10 @@ static void
qcow2_update_options_commit(BlockDriverState *bs,
int i;
if (s->l2_table_cache) {
- qcow2_cache_destroy(bs, s->l2_table_cache);
+ qcow2_cache_destroy(s->l2_table_cache);
}
if (s->refcount_block_cache) {
- qcow2_cache_destroy(bs, s->refcount_block_cache);
+ qcow2_cache_destroy(s->refcount_block_cache);
}
s->l2_table_cache = r->l2_table_cache;
s->refcount_block_cache = r->refcount_block_cache;
@@ -1063,10 +1063,10 @@ static void qcow2_update_options_abort(BlockDriverState
*bs,
Qcow2ReopenState *r)
{
if (r->l2_table_cache) {
- qcow2_cache_destroy(bs, r->l2_table_cache);
+ qcow2_cache_destroy(r->l2_table_cache);
}
if (r->refcount_block_cache) {
- qcow2_cache_destroy(bs, r->refcount_block_cache);
+ qcow2_cache_destroy(r->refcount_block_cache);
}
qapi_free_QCryptoBlockOpenOptions(r->crypto_opts);
}
@@ -1504,10 +1504,10 @@ static int qcow2_do_open(BlockDriverState *bs, QDict
*options, int flags,
s->l1_table = NULL;
cache_clean_timer_del(bs);
if (s->l2_table_cache) {
- qcow2_cache_destroy(bs, s->l2_table_cache);
+ qcow2_cache_destroy(s->l2_table_cache);
}
if (s->refcount_block_cache) {
- qcow2_cache_destroy(bs, s->refcount_block_cache);
+ qcow2_cache_destroy(s->refcount_block_cache);
}
qcrypto_block_free(s->crypto);
qapi_free_QCryptoBlockOpenOptions(s->crypto_opts);
@@ -2090,8 +2090,8 @@ static void qcow2_close(BlockDriverState *bs)
}
cache_clean_timer_del(bs);
- qcow2_cache_destroy(bs, s->l2_table_cache);
- qcow2_cache_destroy(bs, s->refcount_block_cache);
+ qcow2_cache_destroy(s->l2_table_cache);
+ qcow2_cache_destroy(s->refcount_block_cache);
qcrypto_block_free(s->crypto);
s->crypto = NULL;
diff --git a/block/qcow2.h b/block/qcow2.h
index e78d0c2316..a9a6a1c0b5 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -640,7 +640,7 @@ int qcow2_read_snapshots(BlockDriverState *bs);
/* qcow2-cache.c functions */
Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables);
-int qcow2_cache_destroy(BlockDriverState* bs, Qcow2Cache *c);
+int qcow2_cache_destroy(Qcow2Cache *c);
void qcow2_cache_entry_mark_dirty(Qcow2Cache *c, void *table);
int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c);
--
2.11.0
- [Qemu-block] [PATCH v2 00/32] Allow configuring the qcow2 L2 cache entry size, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 22/32] qcow2: Update discard_single_l2() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 29/32] qcow2: Rename l2_table in count_contiguous_clusters_unallocated(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 13/32] qcow2: Add l2_slice_size field to BDRVQcow2State, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 26/32] qcow2: Update qcow2_truncate() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 28/32] qcow2: Rename l2_table in count_contiguous_clusters(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 32/32] iotests: Add test for l2-cache-entry-size, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 04/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 27/32] qcow2: Rename l2_table in qcow2_alloc_compressed_cluster_offset(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 08/32] qcow2: Remove BDS parameter from qcow2_cache_destroy(),
Alberto Garcia <=
- [Qemu-block] [PATCH v2 03/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 01/32] qcow2: Fix documentation of get_cluster_table(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 09/32] qcow2: Remove BDS parameter from qcow2_cache_clean_unused(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 11/32] qcow2: Remove BDS parameter from qcow2_cache_is_table_offset(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 23/32] qcow2: Update zero_single_l2() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 06/32] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 31/32] qcow2: Allow configuring the L2 slice size, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 05/32] qcow2: Remove BDS parameter from qcow2_cache_table_release(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 15/32] qcow2: Update l2_load() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 21/32] qcow2: Update handle_alloc() to support L2 slices, Alberto Garcia, 2017/12/15