[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 05/32] qcow2: Remove BDS parameter from qcow2_cac
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v2 05/32] qcow2: Remove BDS parameter from qcow2_cache_table_release() |
Date: |
Fri, 15 Dec 2017 13:53:33 +0100 |
This function was only using the BlockDriverState parameter to get the
cache table size (since it was equal to the cluster size). This is no
longer necessary so this parameter can be removed.
Signed-off-by: Alberto Garcia <address@hidden>
---
block/qcow2-cache.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index c2a85b80b8..3deded348c 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -71,8 +71,7 @@ static inline const char *qcow2_cache_get_name(BDRVQcow2State
*s, Qcow2Cache *c)
}
}
-static void qcow2_cache_table_release(BlockDriverState *bs, Qcow2Cache *c,
- int i, int num_tables)
+static void qcow2_cache_table_release(Qcow2Cache *c, int i, int num_tables)
{
/* Using MADV_DONTNEED to discard memory is a Linux-specific feature */
#ifdef CONFIG_LINUX
@@ -114,7 +113,7 @@ void qcow2_cache_clean_unused(BlockDriverState *bs,
Qcow2Cache *c)
}
if (to_clean > 0) {
- qcow2_cache_table_release(bs, c, i - to_clean, to_clean);
+ qcow2_cache_table_release(c, i - to_clean, to_clean);
}
}
@@ -306,7 +305,7 @@ int qcow2_cache_empty(BlockDriverState *bs, Qcow2Cache *c)
c->entries[i].lru_counter = 0;
}
- qcow2_cache_table_release(bs, c, 0, c->size);
+ qcow2_cache_table_release(c, 0, c->size);
c->lru_counter = 0;
@@ -453,5 +452,5 @@ void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache
*c, void *table)
c->entries[i].lru_counter = 0;
c->entries[i].dirty = false;
- qcow2_cache_table_release(bs, c, i, 1);
+ qcow2_cache_table_release(c, i, 1);
}
--
2.11.0
- [Qemu-block] [PATCH v2 04/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx(), (continued)
- [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, 2017/12/15
- [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 <=
- [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
- [Qemu-block] [PATCH v2 18/32] qcow2: Update qcow2_get_cluster_offset() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 30/32] qcow2: Rename l2_table in count_cow_clusters(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 20/32] qcow2: Update handle_copied() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 17/32] qcow2: Update get_cluster_table() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 19/32] qcow2: Update qcow2_alloc_cluster_link_l2() to support L2 slices, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 10/32] qcow2: Remove BDS parameter from qcow2_cache_discard(), Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 02/32] qcow2: Add table size field to Qcow2Cache, Alberto Garcia, 2017/12/15
- [Qemu-block] [PATCH v2 16/32] qcow2: Update l2_allocate() to support L2 slices, Alberto Garcia, 2017/12/15