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 1043570

Summary: [xfs/xfstests xfs/073] xfs_copy.c:960:main Assertion failed on v5 file system
Product: Red Hat Enterprise Linux 7 Reporter: Boris Ranto <branto>
Component: xfsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED CURRENTRELEASE QA Contact: Boris Ranto <branto>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dchinner
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xfsprogs-3.2.0-0.8.alpha2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1072283 (view as bug list) Environment:
Last Closed: 2014-06-13 10:13:20 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:
Bug Depends On:    
Bug Blocks: 1072283    

Description Boris Ranto 2013-12-16 16:35:00 UTC
Description of problem:
The test case xfs/073 from xfstests fails on v5 xfs file systems.

Version-Release number of selected component (if applicable):
kernel-3.10.0-57.el7.x86_64
xfsprogs-3.2.0-0.3.alpha2.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Run the test case
MKFS_OPTIONS="-m crc=1" ./check xfs/073
2.
3.

Actual results:
xfs_copy: xfs_copy.c:960: main: Assertion '((__builtin_constant_p((__u32)(( __u32)(__be32)(block->bb_magic))) ? ((__u32)( (((__u32)((( __u32)(__be32)(block->bb_magic))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(block->bb_magic))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(block->bb_magic))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(block->bb_magic))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(block->bb_magic))))) == 0x41425442' failed.


Expected results:
The test passes.

Additional info:

Comment 1 Eric Sandeen 2014-02-24 18:10:19 UTC
xfs_copy is currently completely unaware of V5/CRC filesystems.  It modifies UUIDs, and does not update checksums.

(Incidentally if we use the "-d" option it does all work fine, with a 1-liner to fix the above assert)

-Eric

Comment 2 Eric Sandeen 2014-02-27 19:56:58 UTC
I sent a patch so that it will work with -d and CRCs, and exit gracefully if -d is not used on a CRC enabled fs.  Best we have for now.

Requesting blocker so we can get this fixed; honestly xfs_copy isn't super critical, but it breaks at least the above test with a scary failure and we may as well make it a bit better.

Comment 3 Eric Sandeen 2014-02-28 19:09:31 UTC
Note, this still won't pass xfstests, but it won't assert, it'll fail gracefully.

xfs_copy -d should also now pass on CRC filesystems (there is more work to do in the no -d case)

We could file another bug to for xfs_copy working properly with CRCs in all cases.

-eric

Comment 5 Boris Ranto 2014-03-04 09:54:02 UTC
Verified in xfsprogs-3.2.0-0.8.el7. Although the test case fails (due to the fact that xfs_copy can't copy the V5 file systems without -d option just yet), the assertion is no longer there. I'll clone this bz to track the progress of xfs_copy V5 file system support.

Reproduced in xfsprogs-3.2.0-0.6.alpha2.el7, the assertion failed.

Comment 6 Ludek Smid 2014-06-13 10:13:20 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.