Skip to contentSkip to conversation

ext4: fix removing status extents in ext4_collapse_range()

PATCH Applied Namjae Jeon 2 participants 2 messages Apr 17, 2014 – Apr 18, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Namjae Jeon

author Reviewed-by
#1 lore raw
Quoted 9 lines

Currently in ext4_collapse_range() when calling ext4_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.

Looks good to me!

Thanks Lukas.

#2 lore raw
Quoted 6 lines · Namjae Jeon
Quoted 6 lines

Currently in ext4_collapse_range() when calling ext4_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.

Looks good to me!

Thanks, applied.

- Ted