Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1347698

Summary: xfs_repair: xfs/033 fails due to xfs_repair reporting extra nlink errors on v4 XFS
Product: Red Hat Enterprise Linux 7 Reporter: Eryu Guan <eguan>
Component: xfsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: Eryu Guan <eguan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xfsprogs-4.5.0-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:24:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eryu Guan 2016-06-17 12:23:25 UTC
Description of problem:
xfs_repair detects more nlinks error in xfstests xfs/033, v4 XFS. And this happens after upstream xfsprogs commit "c2c5096 libxfs: update to 3.16 kernel code"

But I'm not sure if it's an xfsprogs bug or just xfstests needs update.

# diff -u tests/xfs/033.out /root/xfstests/results//xfs_4k/xfs/033.out.bad
--- tests/xfs/033.out   2015-07-16 17:28:15.996000000 +0800
+++ /root/xfstests/results//xfs_4k/xfs/033.out.bad      2016-03-04 18:54:39.461000000 +0800
@@ -66,6 +66,7 @@
         - traversal finished ...
         - moving disconnected inodes to lost+found ...
 Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 0 to 1
 done
 Corrupting rt summary inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
@@ -96,6 +97,7 @@
         - traversal finished ...
         - moving disconnected inodes to lost+found ...
 Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 0 to 1
 done
 Corrupting root inode - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
@@ -160,6 +162,7 @@
         - traversal finished ...
         - moving disconnected inodes to lost+found ...
 Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 0 to 1
 done
 Corrupting rt summary inode - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
@@ -191,4 +194,5 @@
         - traversal finished ...
         - moving disconnected inodes to lost+found ...
 Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 0 to 1
 done


Version-Release number of selected component (if applicable):
xfsprogs-4.5.0-2.el7
kernel-3.10.0-439.el7

How reproducible:
always

Steps to Reproduce:
1. MKFS_OPTIONS="-m crc=0" ./check xfs/033
2.
3.

Actual results:


Expected results:


Additional info:
Upstream 4.5 - 4.7-rc3 kernel and xfsprogs 4.5 have the same issue. I reported this issue (along with other issues) to xfs list back in March, no response yet.

http://oss.sgi.com/archives/xfs/2016-03/msg00063.html

Comment 1 Eric Sandeen 2016-06-17 21:15:36 UTC
Interesting, bleeding-edge upstream doesn't have the behavior, but the commit that made it go away is not obviously related (138659f xfs: introduce inode log format object)

On the flip side, the behavior first appeared when we updated libxfs to 3.16

so bisecting isn't suuuuper helpful :/

Comment 2 Eric Sandeen 2016-06-17 21:27:57 UTC
In any case, both runs produce a consistent filesystem, just with different output.

So from a practical / operational point of view, there is no real bug here.  I'd still like to understand what is going on, though.

Comment 3 Eric Sandeen 2016-06-25 00:37:30 UTC
643f6ac xfs_repair: set rsumino version to 2

Comment 5 Eryu Guan 2016-06-29 04:30:41 UTC
Verified with xfsprogs-4.5.0-4.el7, xfs/033 passed without problems

[root@dhcp-66-87-213 xfstests]# MKFS_OPTIONS="-m crc=0" ./check xfs/033
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 dhcp-66-87-213 3.10.0-450.el7.x86_64
MKFS_OPTIONS  -- -f -m crc=0 /dev/vda6
MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/vda6 /mnt/testarea/scratch

xfs/033 2s ... 2s
Ran: xfs/033
Passed all 1 tests

[root@dhcp-66-87-213 xfstests]# rpm -q xfsprogs
xfsprogs-4.5.0-4.el7.x86_64

Move to VERIFIED.

Comment 7 errata-xmlrpc 2016-11-04 06:24:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2431.html