btrfs-progs: lowmem check: Fix false alert about file extent interrupt
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Thu, 22 Jun 2017 08:12:56 +0000 (16:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Jun 2017 15:10:06 +0000 (17:10 +0200)
commitbf95b303f41aa416d62fb7a5beb6761329ec9034
tree3a7756dad62e0eeae214e055b57226c60085abff
parentbb305ae832c4864af85339a3d4947394d4edfb1d
btrfs-progs: lowmem check: Fix false alert about file extent interrupt

As Qu mentioned in this thread
(https://www.spinics.net/lists/linux-btrfs/msg64469.html), compression
can cause regular extent to co-exist with an inlined extent. This
coexistence makes things confusing. Since it is currently allowed and
can appear in a filesystem, fix btrfsck to prevent a bunch of error
reports to appear that will make user feel uneasy.

When checking a file extent, record the extent_end of the regular extent
to check if there is a gap between the regular extents. Normally there
is only one inlined extent, so the extent_end of inlined extent is
useless. However, if a regular extent can co-exist with an inlined
extent, the extent_end of the inlined extent also needs to be recorded.

Reported-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c