Commit 16a60b36 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Rename ntfs_merge_runlists() to ntfs_runlists_merge().

Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 5d303083
...@@ -29,7 +29,8 @@ ToDo/Notes: ...@@ -29,7 +29,8 @@ ToDo/Notes:
- Add vol->mft_data_pos and initialize it at mount time. - Add vol->mft_data_pos and initialize it at mount time.
- Rename init_runlist() to ntfs_init_runlist(), ntfs_vcn_to_lcn() to - Rename init_runlist() to ntfs_init_runlist(), ntfs_vcn_to_lcn() to
ntfs_rl_vcn_to_lcn(), decompress_mapping_pairs() to ntfs_rl_vcn_to_lcn(), decompress_mapping_pairs() to
ntfs_mapping_pairs_decompress() and adapt all callers. ntfs_mapping_pairs_decompress(), ntfs_merge_runlists() to
ntfs_runlists_merge() and adapt all callers.
- Add fs/ntfs/runlist.[hc]::ntfs_get_nr_significant_bytes(), - Add fs/ntfs/runlist.[hc]::ntfs_get_nr_significant_bytes(),
ntfs_get_size_for_mapping_pairs(), ntfs_write_significant_bytes(), ntfs_get_size_for_mapping_pairs(), ntfs_write_significant_bytes(),
and ntfs_mapping_pairs_build(), adapted from libntfs. and ntfs_mapping_pairs_build(), adapted from libntfs.
......
...@@ -1673,7 +1673,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ...@@ -1673,7 +1673,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
* We solve these problems by starting with the $DATA attribute before anything * We solve these problems by starting with the $DATA attribute before anything
* else and iterating using ntfs_attr_lookup($DATA) over all extents. As each * else and iterating using ntfs_attr_lookup($DATA) over all extents. As each
* extent is found, we ntfs_mapping_pairs_decompress() including the implied * extent is found, we ntfs_mapping_pairs_decompress() including the implied
* ntfs_merge_runlists(). Each step of the iteration necessarily provides * ntfs_runlists_merge(). Each step of the iteration necessarily provides
* sufficient information for the next step to complete. * sufficient information for the next step to complete.
* *
* This should work but there are two possible pit falls (see inline comments * This should work but there are two possible pit falls (see inline comments
......
...@@ -449,7 +449,7 @@ static inline runlist_element *ntfs_rl_split(runlist_element *dst, int dsize, ...@@ -449,7 +449,7 @@ static inline runlist_element *ntfs_rl_split(runlist_element *dst, int dsize,
} }
/** /**
* ntfs_merge_runlists - merge two runlists into one * ntfs_runlists_merge - merge two runlists into one
* @drl: original runlist to be worked on * @drl: original runlist to be worked on
* @srl: new runlist to be merged into @drl * @srl: new runlist to be merged into @drl
* *
...@@ -482,7 +482,7 @@ static inline runlist_element *ntfs_rl_split(runlist_element *dst, int dsize, ...@@ -482,7 +482,7 @@ static inline runlist_element *ntfs_rl_split(runlist_element *dst, int dsize,
* -EINVAL - Invalid parameters were passed in. * -EINVAL - Invalid parameters were passed in.
* -ERANGE - The runlists overlap and cannot be merged. * -ERANGE - The runlists overlap and cannot be merged.
*/ */
runlist_element *ntfs_merge_runlists(runlist_element *drl, runlist_element *ntfs_runlists_merge(runlist_element *drl,
runlist_element *srl) runlist_element *srl)
{ {
int di, si; /* Current index into @[ds]rl. */ int di, si; /* Current index into @[ds]rl. */
...@@ -915,7 +915,7 @@ runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, ...@@ -915,7 +915,7 @@ runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol,
return rl; return rl;
} }
/* Now combine the new and old runlists checking for overlaps. */ /* Now combine the new and old runlists checking for overlaps. */
old_rl = ntfs_merge_runlists(old_rl, rl); old_rl = ntfs_runlists_merge(old_rl, rl);
if (likely(!IS_ERR(old_rl))) if (likely(!IS_ERR(old_rl)))
return old_rl; return old_rl;
ntfs_free(rl); ntfs_free(rl);
......
...@@ -40,6 +40,9 @@ typedef enum { ...@@ -40,6 +40,9 @@ typedef enum {
LCN_ENOENT = -3, LCN_ENOENT = -3,
} LCN_SPECIAL_VALUES; } LCN_SPECIAL_VALUES;
extern runlist_element *ntfs_runlists_merge(runlist_element *drl,
runlist_element *srl);
extern runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, extern runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol,
const ATTR_RECORD *attr, runlist_element *old_rl); const ATTR_RECORD *attr, runlist_element *old_rl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment