[Top] [All Lists]

Re: xfs_fsr (defragmenting) 'XFS_IOC_SWAPEXT failed: ino=xxxxxx: Invalid

To: Tom Crane <T.Crane@xxxxxxxxxx>
Subject: Re: xfs_fsr (defragmenting) 'XFS_IOC_SWAPEXT failed: ino=xxxxxx: Invalid argument' error
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 15 Feb 2012 11:28:11 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4F3AAC04.5090400@xxxxxxxxxx>
References: <4F3AAC04.5090400@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 14, 2012 at 06:46:28PM +0000, Tom Crane wrote:
> Dear XFS Support,
>   I am attempting to use xfs_fsr to defrag a 60TB FS but am getting
> some of the following errors;
> 'XFS_IOC_SWAPEXT failed: ino=xxxxxx: Invalid argument'.  Most files
> defrag w/o problem.  In an hour long run only 45/(45+6211) failed
> this way.  Here is a example chunk of syslog from a run with fsr -v
> which includes the FS level reports.
> >Feb 14 15:49:15 store3 fsr[10917]: ino=797728
> >Feb 14 15:49:17 store3 kernel: Filesystem dm-0:
> >fs/xfs/xfs_dfrag.c: inode 0xc2c20 format is incompatible for exchanging.
> >Feb 14 15:49:17 store3 fsr[10917]: XFS_IOC_SWAPEXT failed: ino=797728: 
> >Invalid argument

Which means the kernel caught a condition where the extent swap
could not be done due to differences in the layout of the two
inodes. If we do the swap we corrupt the filesystem, so we abort
and return an error instead.


> Is this a known problem with xfs in this kernel? Any other
> information/tests that I can supply?

No problems with the kernel. Deficiencies are on the userspace side
with how xfs_fsr is setting up the attribute fork on the donor
inode. The event tracing indicated in the second link above will
tell us what the incomaptibility is and maybe how to improve xfs_fsr
t0 avoid it...


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>