[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 25/55] qcow2: Remove BDS parameter from qcow2_cache_c
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 25/55] qcow2: Remove BDS parameter from qcow2_cache_clean_unused() |
Date: |
Tue, 13 Feb 2018 18:04:59 +0100 |
From: Alberto Garcia <address@hidden>
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>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/qcow2.h | 2 +-
block/qcow2-cache.c | 2 +-
block/qcow2.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index 9936cd0700..867f2e8828 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -646,7 +646,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,
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index 6f17a28635..03b3e03c6c 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -93,7 +93,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 38e7fdc4b0..461cc7ab1c 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -706,8 +706,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);
}
--
2.13.6
- [Qemu-block] [PULL 26/55] qcow2: Remove BDS parameter from qcow2_cache_discard(), (continued)
- [Qemu-block] [PULL 26/55] qcow2: Remove BDS parameter from qcow2_cache_discard(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 16/55] block: maintain persistent disabled bitmaps, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 23/55] qcow2: Remove BDS parameter from qcow2_cache_put(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 22/55] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 29/55] qcow2: Add l2_slice_size field to BDRVQcow2State, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 24/55] qcow2: Remove BDS parameter from qcow2_cache_destroy(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 28/55] qcow2: Add offset_to_l1_index(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 37/55] qcow2: Update qcow2_alloc_cluster_link_l2() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 35/55] qcow2: Update get_cluster_table() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 33/55] qcow2: Update l2_allocate() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 25/55] qcow2: Remove BDS parameter from qcow2_cache_clean_unused(),
Kevin Wolf <=
- [Qemu-block] [PULL 38/55] qcow2: Update handle_copied() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 30/55] qcow2: Add offset_to_l2_slice_index(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 27/55] qcow2: Remove BDS parameter from qcow2_cache_is_table_offset(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 31/55] qcow2: Update l2_load() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 32/55] qcow2: Prepare l2_allocate() for adding L2 slice support, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 34/55] qcow2: Refactor get_cluster_table(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 44/55] qcow2: Read refcount before L2 table in expand_zero_clusters_in_l1(), Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 41/55] qcow2: Update zero_single_l2() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 39/55] qcow2: Update handle_alloc() to support L2 slices, Kevin Wolf, 2018/02/13
- [Qemu-block] [PULL 42/55] qcow2: Prepare qcow2_update_snapshot_refcount() for adding L2 slice support, Kevin Wolf, 2018/02/13