ext4: fix removing status extents in ext4_collapse_range()
A message that is not in the archive (sent off-list or not yet received): [email protected]
Namjae Jeon
Reviewed-byQuoted 9 lines
Currently in
ext4_collapse_range()when callingext4_es_remove_extent()to remove status extents we're passing (EXT_MAX_BLOCKS-punch_start- 1) in order to remove all extents from start of the collapse range to the end of the file. However this is wrong because we might miss the possible extent covering the last block of the file.Fix it by removing the -1.
Signed-off-by Lukas Czerner <[email protected]>
Looks good to me!
Thanks Lukas.
Theodore Ts'o
AppliedQuoted 6 lines · Namjae Jeon
Quoted 6 lines
Currently in
ext4_collapse_range()when callingext4_es_remove_extent()to remove status extents we're passing (EXT_MAX_BLOCKS-punch_start- 1) in order to remove all extents from start of the collapse range to the end of the file. However this is wrong because we might miss the possible extent covering the last block of the file.
Quoted 6 lines
Quoted 3 lines
Fix it by removing the -1.
Signed-off-by Lukas Czerner <[email protected]>Looks good to me!
Reviewed-by Namjae Jeon <[email protected]>
Thanks, applied.
- Ted