From 163ca0e431a72bc48c52c2fd9132e32616b9036a Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Fri, 16 Jun 2017 09:43:22 +0800 Subject: [PATCH] btrfs-progs: check: Fix false alert about EXTENT_DATA that shouldn't be a hole Since the incompat feature NO_HOLES still allows us to have an explicit hole file extent, current check is too strict and will cause false alerts like: root 5 EXTENT_DATA[257, 0] shouldn't be hole Fix it by removing the strict file hole extent check. Link: https://www.spinics.net/lists/linux-btrfs/msg66374.html Reported-by: Henk Slager Tested-by: Henk Slager Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- cmds-check.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index ad7c81b..a7d3ab3 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -4836,11 +4836,7 @@ static int check_file_extent(struct btrfs_root *root, struct btrfs_key *fkey, } /* Check EXTENT_DATA hole */ - if (no_holes && is_hole) { - err |= FILE_EXTENT_ERROR; - error("root %llu EXTENT_DATA[%llu %llu] shouldn't be hole", - root->objectid, fkey->objectid, fkey->offset); - } else if (!no_holes && *end != fkey->offset) { + if (!no_holes && *end != fkey->offset) { err |= FILE_EXTENT_ERROR; error("root %llu EXTENT_DATA[%llu %llu] interrupt", root->objectid, fkey->objectid, fkey->offset); -- 2.7.4