Skip to contentSkip to conversation

ext4: Fix extent merging in ext4_ext_shift_path_extents()

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]

#1 lore raw
Quoted 16 lines

There is a bug in ext4_ext_shift_path_extents() where if we actually manage to merge a extent we would skip shifting the next extent. This will result in in one extent in the extent tree not being properly shifted.

This is causing failure in various xfstests tests using fsx or fsstress with collapse range support. It will also cause file system corruption which looks something like:

e2fsck 1.42.9 (4-Feb-2014)
Pass 1: Checking inodes, blocks, and sizes
Inode 20 has out of order extents
(invalid logical block 3, physical block 492938, len 2)
Clear? yes
...

Quoted 8 lines

when running e2fsck.

It's also very easily reproducible just by running fsx without any parameters. I can usually hit the problem within a minute.

Fix it by increasing ex_start only if we're not merging the extent.

You can add : Reviewed-by: Namjae Jeon <[email protected]>

Thanks!