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 1024702 - [xfs/xfstests xfs/300] XFS_IOC_SWAPEXT failed: SCRATCH_MNT/300.test: Invalid argument
Summary: [xfs/xfstests xfs/300] XFS_IOC_SWAPEXT failed: SCRATCH_MNT/300.test: Invalid ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xfsprogs
Version: 6.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: dhe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 09:40 UTC by Eryu Guan
Modified: 2014-10-19 23:08 UTC (History)
2 users (show)

Fixed In Version: xfsprogs-3.1.1-15.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:49:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1564 0 normal SHIPPED_LIVE xfsprogs bug update 2014-10-14 01:27:44 UTC

Description Eryu Guan 2013-10-30 09:40:46 UTC
Description of problem:
xfstests xfs/300 fails, and I remembered that it's a userspace bug, file one to track it.

    --- tests/xfs/300.out	2013-10-29 00:25:19.000000000 -0400
    +++ /var/lib/xfstests/results//xfs/300.out.bad	2013-10-29 03:58:22.355124316 -0400
    @@ -1,3 +1,3 @@
     QA output created by 300
     SCRATCH_MNT/300.test
    -extents before:6 after:1 DONE SCRATCH_MNT/300.test
    +XFS_IOC_SWAPEXT failed: SCRATCH_MNT/300.test: Invalid argument

Version-Release number of selected component (if applicable):
xfsprogs-3.1.1-14.el6

How reproducible:
always

Steps to Reproduce:
1. check xfs/300 on xfs
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Eric Sandeen 2013-10-30 16:10:16 UTC
The perils of writing new tests, I guess.  ;)  Yes, I've sent a patch upstream for this but it's not reviewed yet.

Thanks,
-Eric

Comment 3 RHEL Program Management 2013-11-03 08:04:53 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Eric Sandeen 2014-05-05 17:09:32 UTC
commit 1adfe5c6296d3ea6c182f31a6728fc94af9146f7
Author: Eric Sandeen <sandeen>
Date:   Fri Oct 18 22:30:18 2013 +0000

    xfs_fsr: fix SWAPEXT failures under selinux
    
    If we run xfs_fsr on a system which creates selinux extended
    attributes, the temp file created by xfs_fsr may have a
    large-ish local extended attribute as soon as it is created.
    
    If the target file has NON-local extended attributes, it may
    have a fork offset larger than the temp file, because i.e.
    FMT_EXTENTS attributes take up less space.  We currently
    have no mechanism to grow the temp file's fork offset.
    So in this case, the SWAPEXT ioctl will fail.
    
    (With systems using selinux and lots of xattrs, this becomes
    fairly common in the real world.)
    
    After testing the target file for a non-local extent, and
    checking to see if the temp forkoff needs to be grown on the
    first pass, we can add a large attr to knock all attributes on
    the temp file out of local format, and grow the fork offset for
    this particular case.
    
    This passes xfstest 227, and also resolves issues seen on
    a metadata image provided by Gabriel.

Comment 6 dhe 2014-08-15 03:27:00 UTC
Reproduced on xfsprogs-3.1.1-14.el6.x86_64
https://beaker.engineering.redhat.com/jobs/722160
In test_log-xfs:xfs-300 log:
Running test xfs/300
#! /bin/bash
# FS QA Test No. 300
#
# Test xfs_fsr / swapext management of di_forkoff w/ selinux
#
#-----------------------------------------------------------------------
# Copyright (c) 2013 Red Hat, Inc.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 intel-sugarbay-do-01 2.6.32-431.el6.x86_64
MKFS_OPTIONS  -- -f -bsize=4096 /dev/loop1
MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/loop1 /mnt/testarea/scratch
xfs/300         - output mismatch (see /var/lib/xfstests/results//xfs/300.out.bad)
    --- tests/xfs/300.out        2014-08-14 22:44:07.000000000 -0400
    +++ /var/lib/xfstests/results//xfs/300.out.bad        2014-08-14 22:48:13.550913744 -0400
    @@ -1,3 +1,3 @@
     QA output created by 300
     SCRATCH_MNT/300.test
    -extents before:7 after:1 DONE SCRATCH_MNT/300.test
    +XFS_IOC_SWAPEXT failed: SCRATCH_MNT/300.test: Invalid argument
    ...
    (Run 'diff -u tests/xfs/300.out /var/lib/xfstests/results//xfs/300.out.bad'  to see the entire diff)
Ran: xfs/300
Failures: xfs/300
Failed 1 of 1 tests




Verified on xfsprogs-3.1.1-16.el6.x86_64
https://beaker.engineering.redhat.com/jobs/722185
In test_log-xfs:xfs-300 log:
Running test xfs/300
#! /bin/bash
# FS QA Test No. 300
#
# Test xfs_fsr / swapext management of di_forkoff w/ selinux
#
#-----------------------------------------------------------------------
# Copyright (c) 2013 Red Hat, Inc.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
FSTYP         -- xfs (non-debug)
PLATFORM      -- Linux/x86_64 hp-dl388g8-15 2.6.32-496.el6.x86_64
MKFS_OPTIONS  -- -f -bsize=4096 /dev/loop1
MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/loop1 /mnt/testarea/scratch
xfs/300         0s
Ran: xfs/300
Passed all 1 tests

Comment 7 errata-xmlrpc 2014-10-14 07:49:53 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.

http://rhn.redhat.com/errata/RHBA-2014-1564.html


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