diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-06-25 12:15:36 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-06-25 12:15:36 -0400 |
commit | fa3be92317c4ae34edcf5274e8bbeff181e20b7a (patch) | |
tree | 84ae4ace6c891aa95b804950283e1f8f3e46c730 /fs/ntfs/mft.c | |
parent | 1d58b27b8d77ecb816cfa8f846b78c845675eb89 (diff) |
NTFS: Add an extra parameter @last_vcn to ntfs_get_size_for_mapping_pairs()
and ntfs_mapping_pairs_build() to allow the runlist encoding to be
partial which is desirable when filling holes in sparse attributes.
Update all callers.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/mft.c')
-rw-r--r-- | fs/ntfs/mft.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 61ce09f1b652..3d0ba8e60adc 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
@@ -1407,7 +1407,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol) | |||
1407 | BUG_ON(ll < rl2->vcn); | 1407 | BUG_ON(ll < rl2->vcn); |
1408 | BUG_ON(ll >= rl2->vcn + rl2->length); | 1408 | BUG_ON(ll >= rl2->vcn + rl2->length); |
1409 | /* Get the size for the new mapping pairs array for this extent. */ | 1409 | /* Get the size for the new mapping pairs array for this extent. */ |
1410 | mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll); | 1410 | mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll, -1); |
1411 | if (unlikely(mp_size <= 0)) { | 1411 | if (unlikely(mp_size <= 0)) { |
1412 | ntfs_error(vol->sb, "Get size for mapping pairs failed for " | 1412 | ntfs_error(vol->sb, "Get size for mapping pairs failed for " |
1413 | "mft bitmap attribute extent."); | 1413 | "mft bitmap attribute extent."); |
@@ -1441,7 +1441,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol) | |||
1441 | /* Generate the mapping pairs array directly into the attr record. */ | 1441 | /* Generate the mapping pairs array directly into the attr record. */ |
1442 | ret = ntfs_mapping_pairs_build(vol, (u8*)a + | 1442 | ret = ntfs_mapping_pairs_build(vol, (u8*)a + |
1443 | le16_to_cpu(a->data.non_resident.mapping_pairs_offset), | 1443 | le16_to_cpu(a->data.non_resident.mapping_pairs_offset), |
1444 | mp_size, rl2, ll, NULL); | 1444 | mp_size, rl2, ll, -1, NULL); |
1445 | if (unlikely(ret)) { | 1445 | if (unlikely(ret)) { |
1446 | ntfs_error(vol->sb, "Failed to build mapping pairs array for " | 1446 | ntfs_error(vol->sb, "Failed to build mapping pairs array for " |
1447 | "mft bitmap attribute."); | 1447 | "mft bitmap attribute."); |
@@ -1529,7 +1529,7 @@ undo_alloc: | |||
1529 | a->data.non_resident.mapping_pairs_offset), | 1529 | a->data.non_resident.mapping_pairs_offset), |
1530 | old_alen - le16_to_cpu( | 1530 | old_alen - le16_to_cpu( |
1531 | a->data.non_resident.mapping_pairs_offset), | 1531 | a->data.non_resident.mapping_pairs_offset), |
1532 | rl2, ll, NULL)) { | 1532 | rl2, ll, -1, NULL)) { |
1533 | ntfs_error(vol->sb, "Failed to restore mapping pairs " | 1533 | ntfs_error(vol->sb, "Failed to restore mapping pairs " |
1534 | "array.%s", es); | 1534 | "array.%s", es); |
1535 | NVolSetErrors(vol); | 1535 | NVolSetErrors(vol); |
@@ -1838,7 +1838,7 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol) | |||
1838 | BUG_ON(ll < rl2->vcn); | 1838 | BUG_ON(ll < rl2->vcn); |
1839 | BUG_ON(ll >= rl2->vcn + rl2->length); | 1839 | BUG_ON(ll >= rl2->vcn + rl2->length); |
1840 | /* Get the size for the new mapping pairs array for this extent. */ | 1840 | /* Get the size for the new mapping pairs array for this extent. */ |
1841 | mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll); | 1841 | mp_size = ntfs_get_size_for_mapping_pairs(vol, rl2, ll, -1); |
1842 | if (unlikely(mp_size <= 0)) { | 1842 | if (unlikely(mp_size <= 0)) { |
1843 | ntfs_error(vol->sb, "Get size for mapping pairs failed for " | 1843 | ntfs_error(vol->sb, "Get size for mapping pairs failed for " |
1844 | "mft data attribute extent."); | 1844 | "mft data attribute extent."); |
@@ -1877,7 +1877,7 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol) | |||
1877 | /* Generate the mapping pairs array directly into the attr record. */ | 1877 | /* Generate the mapping pairs array directly into the attr record. */ |
1878 | ret = ntfs_mapping_pairs_build(vol, (u8*)a + | 1878 | ret = ntfs_mapping_pairs_build(vol, (u8*)a + |
1879 | le16_to_cpu(a->data.non_resident.mapping_pairs_offset), | 1879 | le16_to_cpu(a->data.non_resident.mapping_pairs_offset), |
1880 | mp_size, rl2, ll, NULL); | 1880 | mp_size, rl2, ll, -1, NULL); |
1881 | if (unlikely(ret)) { | 1881 | if (unlikely(ret)) { |
1882 | ntfs_error(vol->sb, "Failed to build mapping pairs array of " | 1882 | ntfs_error(vol->sb, "Failed to build mapping pairs array of " |
1883 | "mft data attribute."); | 1883 | "mft data attribute."); |
@@ -1959,7 +1959,7 @@ undo_alloc: | |||
1959 | a->data.non_resident.mapping_pairs_offset), | 1959 | a->data.non_resident.mapping_pairs_offset), |
1960 | old_alen - le16_to_cpu( | 1960 | old_alen - le16_to_cpu( |
1961 | a->data.non_resident.mapping_pairs_offset), | 1961 | a->data.non_resident.mapping_pairs_offset), |
1962 | rl2, ll, NULL)) { | 1962 | rl2, ll, -1, NULL)) { |
1963 | ntfs_error(vol->sb, "Failed to restore mapping pairs " | 1963 | ntfs_error(vol->sb, "Failed to restore mapping pairs " |
1964 | "array.%s", es); | 1964 | "array.%s", es); |
1965 | NVolSetErrors(vol); | 1965 | NVolSetErrors(vol); |