run_list_element * decompress_mapping_pairs (const ntfs_volume * vol, const ATTR_RECORD * attr, run_list_element * old_rl);
It is up to the caller to serialize access to the run list old_rl.
Decompress the attribute attr's mapping pairs array into a run list. On success, return the decompressed run list.
If old_rl is not NULL, decompressed run list is inserted into the appropriate place in old_rl and the resultant, combined run list is returned. The original old_rl is deallocated.
On error, return -errno. old_rl is left unmodified in that case.
-ENOMEM - Not enough memory to allocate run list array. -EIO - Corrupt run list. -EINVAL - Invalid parameters were passed in. -ERANGE - The two run lists overlap.
For now we take the conceptionally simplest approach of creating the new run list disregarding the already existing one and then splicing the two into one, if that is possible (we check for overlap and discard the new run list if overlap present before returning ERR_PTR(-ERANGE)).