disk cache: initialize cache path and index only when used
authorTapani Pälli <tapani.palli@intel.com>
Mon, 22 Jan 2018 09:55:06 +0000 (11:55 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 7 Feb 2018 12:45:34 +0000 (14:45 +0200)
commit6a651b6b77b68db71a027c826abccc843ace88ef
tree322afa365c7c65b1078813ebe1a448da41ec1ac5
parente8495646afb06a9dd7786e9d11f4cdd7ac49279a
disk cache: initialize cache path and index only when used

This patch makes disk_cache initialize path and index lazily so
that we can utilize disk_cache without a path using callback
functionality introduced by next patch.

v2: unmap mmap and destroy queue only if index_mmap exists

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/util/disk_cache.c