runlist_element * ntfs_mapping_pairs_decompress (const ntfs_volume * vol, const ATTR_RECORD * attr, runlist_element * old_rl);
It is up to the caller to serialize access to the runlist old_rl.
Decompress the attribute attr's mapping pairs array into a runlist. On success, return the decompressed runlist.
If old_rl is not NULL, decompressed runlist is inserted into the appropriate place in old_rl and the resultant, combined runlist 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 runlist array. -EIO - Corrupt runlist. -EINVAL - Invalid parameters were passed in. -ERANGE - The two runlists overlap.
For now we take the conceptionally simplest approach of creating the new runlist disregarding the already existing one and then splicing the two into one, if that is possible (we check for overlap and discard the new runlist if overlap present before returning ERR_PTR(-ERANGE)).