[Top] [All Lists]

Re: Is xfs_fsr broken for Linux 3.8-rc?

To: "Michael L. Semon" <mlsemon35@xxxxxxxxx>
Subject: Re: Is xfs_fsr broken for Linux 3.8-rc?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 7 Jan 2013 07:16:25 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <CAJzLF9mV-8h8XDGS_yJX=O+8_L0KOa7_TcziPqhCTH2yK4erJA@xxxxxxxxxxxxxx>
References: <CAJzLF9mV-8h8XDGS_yJX=O+8_L0KOa7_TcziPqhCTH2yK4erJA@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jan 04, 2013 at 01:08:06AM -0500, Michael L. Semon wrote:
> Hi!  I upgraded the Linux kernel, glibc (to 2.17), and xfsprogs (to
> 3.1.9) on three 32-bit x86 PCs.  Only one of them was upgraded to
> Linux 3.8-rc2, and I get xfs_fsr output like this, regardless of which
> XFS filesystem on which xfs_fsr is used:
> XFS_IOC_SWAPEXT failed: ino=1048813: Invalid argument

That's the kernel telling you that it couldn't swap the extents on a
file that xfs-fsr was tryng to defrag. Newer kernels are much more
strict about swapping extents to avoid filesystem corruptions that
can occur as a result inode fork offset mismatchs.

If you trace the fsr run with:

# trace-cmd record -e xfs_swap\* xfs_fsr .....

And then dump the trace to a file via:

# trace-cmd report > some_output_file.txt

and attach some_output_file.txt then I can probably tell you exactly
why the request to swap extents is failing.

> If you can reproduce this problem, could you tell me by which kernel
> or xfsprogs version this will be fixed?  Really, a fix isn't really
> needed, merely an assurance that XFS will still be production-ready
> when kernel 3.8 has its main release.

I think you've got that the wrong way around - it's the older
versions of XFS that are unsafe as they can silently corrupt files,
not the newer kernels that issue a warning after detecting this
problem and hence return an error...


Dave Chinner

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