diff options
author | Juan Quintela <quintela@redhat.com> | 2017-10-06 22:30:45 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-10-23 18:03:25 +0200 |
commit | 80f8dfde97e89739d7b9edcf0afceaed3f7f2aad (patch) | |
tree | cacb98b269ad5b6f2019b59c8ea75a7079b576ed /migration/page_cache.h | |
parent | 8acabf69ea36a5d8c09b4015b350afb3fc3bd12f (diff) |
migration: Make cache_init() take an error parameter
Once there, take a total size instead of the size of the pages. We
move the check that the new_size is bigger than one page from
xbzrle_cache_resize().
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Fix typo spotted by Peter Xu
Diffstat (limited to 'migration/page_cache.h')
-rw-r--r-- | migration/page_cache.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/migration/page_cache.h b/migration/page_cache.h index 931868b857..0cb94498a0 100644 --- a/migration/page_cache.h +++ b/migration/page_cache.h @@ -24,12 +24,11 @@ typedef struct PageCache PageCache; * * Returns new allocated cache or NULL on error * - * @cache pointer to the PageCache struct - * @num_pages: cache maximal number of cached pages + * @cache_size: cache size in bytes * @page_size: cache page size + * @errp: set *errp if the check failed, with reason */ -PageCache *cache_init(size_t num_pages, size_t page_size); - +PageCache *cache_init(int64_t cache_size, size_t page_size, Error **errp); /** * cache_fini: free all cache resources * @cache pointer to the PageCache struct |