migration: Make cache size elements use the right types
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
ceaaecb49f
commit
9ca3f96394
@ -39,12 +39,12 @@ struct CacheItem {
|
|||||||
|
|
||||||
struct PageCache {
|
struct PageCache {
|
||||||
CacheItem *page_cache;
|
CacheItem *page_cache;
|
||||||
unsigned int page_size;
|
size_t page_size;
|
||||||
int64_t max_num_items;
|
size_t max_num_items;
|
||||||
int64_t num_items;
|
size_t num_items;
|
||||||
};
|
};
|
||||||
|
|
||||||
PageCache *cache_init(int64_t num_pages, unsigned int page_size)
|
PageCache *cache_init(size_t num_pages, size_t page_size)
|
||||||
{
|
{
|
||||||
int64_t i;
|
int64_t i;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ typedef struct PageCache PageCache;
|
|||||||
* @num_pages: cache maximal number of cached pages
|
* @num_pages: cache maximal number of cached pages
|
||||||
* @page_size: cache page size
|
* @page_size: cache page size
|
||||||
*/
|
*/
|
||||||
PageCache *cache_init(int64_t num_pages, unsigned int page_size);
|
PageCache *cache_init(size_t num_pages, size_t page_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cache_fini: free all cache resources
|
* cache_fini: free all cache resources
|
||||||
|
Loading…
Reference in New Issue
Block a user