[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 09/31] qcow2: Remove BDS parameter from qcow2_cache_
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH 09/31] qcow2: Remove BDS parameter from qcow2_cache_clean_unused() |
Date: |
Thu, 12 Oct 2017 16:05:23 +0300 |
This function was only using the BlockDriverState parameter to pass it
to qcow2_cache_table_release(). This is no longer necessary so this
parameter can be removed.
Signed-off-by: Alberto Garcia <address@hidden>
---
block/qcow2-cache.c | 2 +-
block/qcow2.c | 4 ++--
block/qcow2.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index a50a56bd8b..cc7995c4bf 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -81,7 +81,7 @@ static inline bool can_clean_entry(Qcow2Cache *c, int i)
t->lru_counter <= c->cache_clean_lru_counter;
}
-void qcow2_cache_clean_unused(BlockDriverState *bs, Qcow2Cache *c)
+void qcow2_cache_clean_unused(Qcow2Cache *c)
{
int i = 0;
while (i < c->size) {
diff --git a/block/qcow2.c b/block/qcow2.c
index ba8139f82c..9f55e0a9ff 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -693,8 +693,8 @@ static void cache_clean_timer_cb(void *opaque)
{
BlockDriverState *bs = opaque;
BDRVQcow2State *s = bs->opaque;
- qcow2_cache_clean_unused(bs, s->l2_table_cache);
- qcow2_cache_clean_unused(bs, s->refcount_block_cache);
+ qcow2_cache_clean_unused(s->l2_table_cache);
+ qcow2_cache_clean_unused(s->refcount_block_cache);
timer_mod(s->cache_clean_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) +
(int64_t) s->cache_clean_interval * 1000);
}
diff --git a/block/qcow2.h b/block/qcow2.h
index ddf60fa290..9e6b5102f0 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -655,7 +655,7 @@ int qcow2_cache_set_dependency(BlockDriverState *bs,
Qcow2Cache *c,
Qcow2Cache *dependency);
void qcow2_cache_depends_on_flush(Qcow2Cache *c);
-void qcow2_cache_clean_unused(BlockDriverState *bs, Qcow2Cache *c);
+void qcow2_cache_clean_unused(Qcow2Cache *c);
int qcow2_cache_empty(BlockDriverState *bs, Qcow2Cache *c);
int qcow2_cache_get(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset,
--
2.11.0
- [Qemu-block] [PATCH 08/31] qcow2: Remove BDS parameter from qcow2_cache_destroy(), (continued)
- [Qemu-block] [PATCH 08/31] qcow2: Remove BDS parameter from qcow2_cache_destroy(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 10/31] qcow2: Remove BDS parameter from qcow2_cache_discard(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 12/31] qcow2: Add offset_to_l1_index(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 07/31] qcow2: Remove BDS parameter from qcow2_cache_put(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 16/31] qcow2: Update l2_allocate() to support L2 slices, Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 11/31] qcow2: Remove BDS parameter from qcow2_cache_is_table_offset(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 06/31] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 15/31] qcow2: Update l2_load() to support L2 slices, Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 05/31] qcow2: Remove BDS parameter from qcow2_cache_table_release(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 14/31] qcow2: Add offset_to_l2_slice_index(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 09/31] qcow2: Remove BDS parameter from qcow2_cache_clean_unused(),
Alberto Garcia <=
- [Qemu-block] [PATCH 17/31] qcow2: Update get_cluster_table() to support L2 slices, Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 04/31] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 13/31] qcow2: Add l2_slice_size field to BDRVQcow2State, Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 03/31] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr(), Alberto Garcia, 2017/10/12
- [Qemu-block] [PATCH 01/31] qcow2: Fix documentation of get_cluster_table(), Alberto Garcia, 2017/10/12
- Re: [Qemu-block] [Qemu-devel] [PATCH 00/31] Allow configuring the qcow2 L2 cache entry size, no-reply, 2017/10/12
- Re: [Qemu-block] [Qemu-devel] [PATCH 00/31] Allow configuring the qcow2 L2 cache entry size, no-reply, 2017/10/12