Currently, the logic to mmap a region of a ds_file is contained in
ds_file_mmap_next. ds_file_mmap_next is also responsible for mapping
the region immediately following the currently mapped region, if there
is a currently mapped region.
I find this double responsibility a bit confusing, especially where
ds_file_mmap_next is used in medop_seek.
This patch extracts a portion of ds_file_mmap_next to a new function
ds_file_mmap, whose job is to ensure a file offset is mapped, and to do
the needful if it isn't.
Change-Id: Ia19725d28cf9c24084a52d16c7a88f30b32ff694
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>