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 1346927

Summary: xfs_check (xfs_db) broken on multi-inode-record inode chunks
Product: Red Hat Enterprise Linux 7 Reporter: Brian Foster <bfoster>
Component: xfsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: Eryu Guan <eguan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: eguan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
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:27 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 Brian Foster 2016-06-15 16:19:19 UTC
xfs_check is currently broken for multi-inode-record situations (e.g., 64k block sizes on supported arches). To reproduce, format a large block size fs and run check:

# mkfs.xfs -f -b size=64k <dev>
# xfs_db -c check <dev>
bad magic number 0 for inode 1152
bad magic number 0 for inode 1153
bad magic number 0 for inode 1154
bad magic number 0 for inode 1155
bad magic number 0 for inode 1156
bad magic number 0 for inode 1157
bad magic number 0 for inode 1158
bad magic number 0 for inode 1159
bad magic number 0 for inode 1160
bad magic number 0 for inode 1161
...

This occurs due to some broken logic in upstream xfsprogs commit bb2f98b7 ("xfs_db: make check work for sparse inodes"). Since this patch adds support for sparse inodes and sparse inodes are not yet supported in rhel, the best course of action is probably to revert/drop the patch from xfsprogs in rhel 7.3.

Comment 1 Eric Sandeen 2016-06-15 16:20:24 UTC
Thanks Brian.  That patch reverts cleanly.

Comment 2 Eric Sandeen 2016-06-25 00:38:27 UTC
09c93e5 xfs_db: Revert "xfs_db: make check work for sparse inodes"

Comment 4 Eryu Guan 2016-07-21 03:41:26 UTC
*** Bug 1347671 has been marked as a duplicate of this bug. ***

Comment 5 Eryu Guan 2016-07-21 03:47:03 UTC
Tested with xfsprogs-4.5.0-5.el7, xfs/032 and xfs/186 (v4 only) all passed without problems. A manual check passed too

[root@dhcp-66-87-213 xfstests]# rpm -q xfsprogs
xfsprogs-4.5.0-5.el7.x86_64
[root@dhcp-66-87-213 xfstests]# mkfs.xfs -f -b size=64k /dev/vda6
meta-data=/dev/vda6              isize=512    agcount=4, agsize=36864 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=65536  blocks=147456, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=65536  ascii-ci=0 ftype=1
log      =internal log           bsize=65536  blocks=512, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=65536  blocks=0, rtextents=0
[root@dhcp-66-87-213 xfstests]# xfs_db -c check /dev/vda6
[root@dhcp-66-87-213 xfstests]# echo $?
0

Move to VERIFIED.

Comment 7 errata-xmlrpc 2016-11-04 06:24:27 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