From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs-progs: lowmem check: Fix false alert about file extent interrupt
Date: Thu, 22 Jun 2017 15:52:37 +0800 [thread overview]
Message-ID: <20170622075237.1852-1-lufq.fnst@cn.fujitsu.com> (raw)
As Qu mentioned in this thread
(https://www.spinics.net/lists/linux-btrfs/msg64469.html), compression
can cause regular extent to co-exist with inlined extent. This coexistence
makes things confusing. Since it was permitted currently, so fix
btrfsck to prevent a bunch of error logs that will make user feel
panic.
When check file extent, record the extent_end of 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 regular extent can co-exist with inlined extent, the extent_end of
inlined extent also need to record.
Reported-by: Chris Murphy <lists@colorremedies.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
---
cmds-check.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmds-check.c b/cmds-check.c
index c052f66e..c173d285 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -4782,6 +4782,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;
}
--
2.13.1
next reply other threads:[~2017-06-22 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 7:52 Lu Fengqi [this message]
2017-06-22 8:12 ` [PATCH v2] btrfs-progs: lowmem check: Fix false alert about file extent interrupt Lu Fengqi
2017-06-26 14:55 ` David Sterba
2017-06-27 5:37 ` Lu Fengqi
2017-06-27 12:06 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170622075237.1852-1-lufq.fnst@cn.fujitsu.com \
--to=lufq.fnst@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.