diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2017-06-22 16:12:56 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-26 17:10:06 +0200 |
commit | bf95b303f41aa416d62fb7a5beb6761329ec9034 (patch) | |
tree | 3a7756dad62e0eeae214e055b57226c60085abff | |
parent | bb305ae832c4864af85339a3d4947394d4edfb1d (diff) |
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>
-rw-r--r-- | cmds-check.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-check.c b/cmds-check.c index a7d3ab31..23adc032 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -4777,6 +4777,7 @@ static int check_file_extent(struct btrfs_root *root, struct btrfs_key *fkey, extent_num_bytes, item_inline_len); err |= FILE_EXTENT_ERROR; } + *end += extent_num_bytes; *size += extent_num_bytes; return err; } |