* [Bug 210535] [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
@ 2020-12-07 17:14 ` bugzilla-daemon
2020-12-07 17:16 ` bugzilla-daemon
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2020-12-07 17:14 UTC (permalink / raw)
To: linux-xfs
https://bugzilla.kernel.org/show_bug.cgi?id=210535
--- Comment #1 from Zorro Lang (zlang@redhat.com) ---
Created attachment 294023
--> https://bugzilla.kernel.org/attachment.cgi?id=294023&action=edit
generic-466.dmesg
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 210535] [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
2020-12-07 17:14 ` [Bug 210535] " bugzilla-daemon
@ 2020-12-07 17:16 ` bugzilla-daemon
2020-12-07 18:52 ` [Bug 210535] New: " Darrick J. Wong
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2020-12-07 17:16 UTC (permalink / raw)
To: linux-xfs
https://bugzilla.kernel.org/show_bug.cgi?id=210535
--- Comment #2 from Zorro Lang (zlang@redhat.com) ---
Oh, test with MKFS_OPTIONS=-m reflink=1,rmapbt=1
meta-data=/dev/sda3 isize=512 agcount=4, agsize=983040 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=0
data = bsize=4096 blocks=3932160, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
2020-12-07 17:14 ` [Bug 210535] " bugzilla-daemon
2020-12-07 17:16 ` bugzilla-daemon
@ 2020-12-07 18:52 ` Darrick J. Wong
2020-12-07 18:52 ` [Bug 210535] " bugzilla-daemon
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Darrick J. Wong @ 2020-12-07 18:52 UTC (permalink / raw)
To: zlang, bugzilla-daemon; +Cc: linux-xfs
On Mon, Dec 07, 2020 at 05:14:26PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=210535
>
> Bug ID: 210535
> Summary: [xfstests generic/466] XFS: Assertion failed:
> next_agino == irec->ir_startino +
> XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line:
> 366
> Product: File System
> Version: 2.5
> Kernel Version: xfs-linux xfs-5.10-fixes-7
> Hardware: All
> OS: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: XFS
> Assignee: filesystem_xfs@kernel-bugs.kernel.org
> Reporter: zlang@redhat.com
> Regression: No
>
> Created attachment 294021
> --> https://bugzilla.kernel.org/attachment.cgi?id=294021&action=edit
> generic-466.full
>
> xfstests generic/466 hit below assertion failure on power9 ppc64le:
>
> [16404.196161] XFS: Assertion failed: next_agino == irec->ir_startino +
> XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
Does this patch fix it?
--D
From: Darrick J. Wong <darrick.wong@oracle.com>
Subject: [PATCH] xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks
In commit 27c14b5daa82 we started tracking the last inode seen during an
inode walk to avoid infinite loops if a corrupt inobt record happens to
have a lower ir_startino than the record preceeding it. Unfortunately,
the assertion trips over the case where there are completely empty inobt
records (which can happen quite easily on 64k page filesystems) because
we advance the tracking cursor without actually putting the empty record
into the processing buffer. Fix the assert to allow for this case.
Reported-by: zlang@redhat.com
Fixes: 27c14b5daa82 ("xfs: ensure inobt record walks always make forward progress")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_iwalk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c
index 2a45138831e3..eae3aff9bc97 100644
--- a/fs/xfs/xfs_iwalk.c
+++ b/fs/xfs/xfs_iwalk.c
@@ -363,7 +363,7 @@ xfs_iwalk_run_callbacks(
/* Delete cursor but remember the last record we cached... */
xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0);
irec = &iwag->recs[iwag->nr_recs - 1];
- ASSERT(next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK);
+ ASSERT(next_agino >= irec->ir_startino + XFS_INODES_PER_CHUNK);
error = xfs_iwalk_ag_recs(iwag);
if (error)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Bug 210535] [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
` (2 preceding siblings ...)
2020-12-07 18:52 ` [Bug 210535] New: " Darrick J. Wong
@ 2020-12-07 18:52 ` bugzilla-daemon
2020-12-08 17:10 ` bugzilla-daemon
2020-12-08 17:13 ` bugzilla-daemon
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2020-12-07 18:52 UTC (permalink / raw)
To: linux-xfs
https://bugzilla.kernel.org/show_bug.cgi?id=210535
--- Comment #3 from darrick.wong@oracle.com ---
On Mon, Dec 07, 2020 at 05:14:26PM +0000, bugzilla-daemon@bugzilla.kernel.org
wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=210535
>
> Bug ID: 210535
> Summary: [xfstests generic/466] XFS: Assertion failed:
> next_agino == irec->ir_startino +
> XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line:
> 366
> Product: File System
> Version: 2.5
> Kernel Version: xfs-linux xfs-5.10-fixes-7
> Hardware: All
> OS: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: XFS
> Assignee: filesystem_xfs@kernel-bugs.kernel.org
> Reporter: zlang@redhat.com
> Regression: No
>
> Created attachment 294021
> --> https://bugzilla.kernel.org/attachment.cgi?id=294021&action=edit
> generic-466.full
>
> xfstests generic/466 hit below assertion failure on power9 ppc64le:
>
> [16404.196161] XFS: Assertion failed: next_agino == irec->ir_startino +
> XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
Does this patch fix it?
--D
From: Darrick J. Wong <darrick.wong@oracle.com>
Subject: [PATCH] xfs: fix the forward progress assertion in
xfs_iwalk_run_callbacks
In commit 27c14b5daa82 we started tracking the last inode seen during an
inode walk to avoid infinite loops if a corrupt inobt record happens to
have a lower ir_startino than the record preceeding it. Unfortunately,
the assertion trips over the case where there are completely empty inobt
records (which can happen quite easily on 64k page filesystems) because
we advance the tracking cursor without actually putting the empty record
into the processing buffer. Fix the assert to allow for this case.
Reported-by: zlang@redhat.com
Fixes: 27c14b5daa82 ("xfs: ensure inobt record walks always make forward
progress")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_iwalk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c
index 2a45138831e3..eae3aff9bc97 100644
--- a/fs/xfs/xfs_iwalk.c
+++ b/fs/xfs/xfs_iwalk.c
@@ -363,7 +363,7 @@ xfs_iwalk_run_callbacks(
/* Delete cursor but remember the last record we cached... */
xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0);
irec = &iwag->recs[iwag->nr_recs - 1];
- ASSERT(next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK);
+ ASSERT(next_agino >= irec->ir_startino + XFS_INODES_PER_CHUNK);
error = xfs_iwalk_ag_recs(iwag);
if (error)
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Bug 210535] [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
` (3 preceding siblings ...)
2020-12-07 18:52 ` [Bug 210535] " bugzilla-daemon
@ 2020-12-08 17:10 ` bugzilla-daemon
2020-12-08 17:13 ` bugzilla-daemon
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2020-12-08 17:10 UTC (permalink / raw)
To: linux-xfs
https://bugzilla.kernel.org/show_bug.cgi?id=210535
--- Comment #4 from Zorro Lang (zlang@redhat.com) ---
Created attachment 294049
--> https://bugzilla.kernel.org/attachment.cgi?id=294049&action=edit
g466-xfs.metadump.tar.gz
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug 210535] [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
2020-12-07 17:14 [Bug 210535] New: [xfstests generic/466] XFS: Assertion failed: next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366 bugzilla-daemon
` (4 preceding siblings ...)
2020-12-08 17:10 ` bugzilla-daemon
@ 2020-12-08 17:13 ` bugzilla-daemon
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2020-12-08 17:13 UTC (permalink / raw)
To: linux-xfs
https://bugzilla.kernel.org/show_bug.cgi?id=210535
--- Comment #5 from Zorro Lang (zlang@redhat.com) ---
(In reply to darrick.wong from comment #3)
> On Mon, Dec 07, 2020 at 05:14:26PM +0000,
> bugzilla-daemon@bugzilla.kernel.org wrote:
> > https://bugzilla.kernel.org/show_bug.cgi?id=210535
> >
> > Bug ID: 210535
> > Summary: [xfstests generic/466] XFS: Assertion failed:
> > next_agino == irec->ir_startino +
> > XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line:
> > 366
> > Product: File System
> > Version: 2.5
> > Kernel Version: xfs-linux xfs-5.10-fixes-7
> > Hardware: All
> > OS: Linux
> > Tree: Mainline
> > Status: NEW
> > Severity: normal
> > Priority: P1
> > Component: XFS
> > Assignee: filesystem_xfs@kernel-bugs.kernel.org
> > Reporter: zlang@redhat.com
> > Regression: No
> >
> > Created attachment 294021 [details]
> > --> https://bugzilla.kernel.org/attachment.cgi?id=294021&action=edit
> > generic-466.full
> >
> > xfstests generic/466 hit below assertion failure on power9 ppc64le:
> >
> > [16404.196161] XFS: Assertion failed: next_agino == irec->ir_startino +
> > XFS_INODES_PER_CHUNK, file: fs/xfs/xfs_iwalk.c, line: 366
>
> Does this patch fix it?
>
> --D
>
> From: Darrick J. Wong <darrick.wong@oracle.com>
> Subject: [PATCH] xfs: fix the forward progress assertion in
> xfs_iwalk_run_callbacks
>
> In commit 27c14b5daa82 we started tracking the last inode seen during an
> inode walk to avoid infinite loops if a corrupt inobt record happens to
> have a lower ir_startino than the record preceeding it. Unfortunately,
> the assertion trips over the case where there are completely empty inobt
> records (which can happen quite easily on 64k page filesystems) because
> we advance the tracking cursor without actually putting the empty record
> into the processing buffer. Fix the assert to allow for this case.
>
> Reported-by: zlang@redhat.com
> Fixes: 27c14b5daa82 ("xfs: ensure inobt record walks always make forward
> progress")
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/xfs_iwalk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c
> index 2a45138831e3..eae3aff9bc97 100644
> --- a/fs/xfs/xfs_iwalk.c
> +++ b/fs/xfs/xfs_iwalk.c
> @@ -363,7 +363,7 @@ xfs_iwalk_run_callbacks(
> /* Delete cursor but remember the last record we cached... */
> xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0);
> irec = &iwag->recs[iwag->nr_recs - 1];
> - ASSERT(next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK);
> + ASSERT(next_agino >= irec->ir_startino + XFS_INODES_PER_CHUNK);
>
> error = xfs_iwalk_ag_recs(iwag);
> if (error)
I just tested on the same P9 machine which reproduced this bug, generic/466
test passed with this patch
--
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread