Filemap: implement ugly heuristics for SEEK_HOLE
Old kernels do not have real SEEK_HOLE support, but instead, provide a stub
implementation which just returns EOF. And there seem to be no easy way to find
out whether the implementation is real or fake. But we need to know this,
because it is crucial for use since we won't get the block map with fake
SEEK_HOLE implementation.
This patch implements an ugly test which appends a hole to the image file,
tests whether SEEK_HOLE is fake or not, and then truncats the image file back
to the original size.
Change-Id: Ib5744d5247aa0cda02517afe7189059cc5efeb9b
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>