Bug 1043570 - [xfs/xfstests xfs/073] xfs_copy.c:960:main Assertion failed on v5 file system
Summary: [xfs/xfstests xfs/073] xfs_copy.c:960:main Assertion failed on v5 file system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: xfsprogs
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Boris Ranto
URL:
Whiteboard:
Depends On:
Blocks: 1072283
TreeView+ depends on / blocked
 
Reported: 2013-12-16 16:35 UTC by Boris Ranto
Modified: 2014-06-18 04:55 UTC (History)
1 user (show)

Fixed In Version: xfsprogs-3.2.0-0.8.alpha2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1072283 (view as bug list)
Environment:
Last Closed: 2014-06-13 10:13:20 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.