From: Chandan Babu R <chandanrlinux@gmail.com>
To: linux-xfs@vger.kernel.org
Cc: Chandan Babu R <chandanrlinux@gmail.com>
Subject: [PATCH] xfs: scrub: Remove incorrect check executed on block format directories
Date: Fri, 26 Mar 2021 17:03:12 +0530 [thread overview]
Message-ID: <20210326113312.983-1-chandanrlinux@gmail.com> (raw)
A directory with one directory block which in turns consists of two or more fs
blocks is incorrectly flagged as corrupt by scrub since it assumes that
"Block" format directories have a data fork single extent spanning the file
offset range of [0, Dir block size - 1].
This commit fixes the bug by removing the incorrect check.
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
---
fs/xfs/scrub/dir.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c
index 178b3455a170..3ec6290c78bb 100644
--- a/fs/xfs/scrub/dir.c
+++ b/fs/xfs/scrub/dir.c
@@ -694,15 +694,6 @@ xchk_directory_blocks(
/* Iterate all the data extents in the directory... */
found = xfs_iext_lookup_extent(sc->ip, ifp, lblk, &icur, &got);
while (found && !(sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) {
- /* Block directories only have a single block at offset 0. */
- if (is_block &&
- (got.br_startoff > 0 ||
- got.br_blockcount != args.geo->fsbcount)) {
- xchk_fblock_set_corrupt(sc, XFS_DATA_FORK,
- got.br_startoff);
- break;
- }
-
/* No more data blocks... */
if (got.br_startoff >= leaf_lblk)
break;
--
2.29.2
next reply other threads:[~2021-03-26 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 11:33 Chandan Babu R [this message]
2021-03-26 17:47 ` [PATCH] xfs: scrub: Remove incorrect check executed on block format directories Darrick J. Wong
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=20210326113312.983-1-chandanrlinux@gmail.com \
--to=chandanrlinux@gmail.com \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox