qcow2: add qcow2_cache_discard
commitf71c08ea8e60f035485a512fd2af8908567592f0
authorPavel Butsykin <pbutsykin@virtuozzo.com>
Mon, 18 Sep 2017 12:42:28 +0000 (18 15:42 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 26 Sep 2017 13:00:32 +0000 (26 15:00 +0200)
treea3ef8dc5e1f34e1a18d755672029bced057885ba
parent4ffca8904a350460cdaa6304ea8c9b9c693d2d91
qcow2: add qcow2_cache_discard

Whenever l2/refcount table clusters are discarded from the file we can
automatically drop unnecessary content of the cache tables. This reduces
the chance of eviction useful cache data and eliminates inconsistent data
in the cache with the data in the file.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20170918124230.8152-3-pbutsykin@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cache.c
block/qcow2-refcount.c
block/qcow2.h