xfs
[Top] [All Lists]

Re: TRIM on XFS

To: Jeffrey Hundstad <jeffrey.hundstad@xxxxxxxx>
Subject: Re: TRIM on XFS
From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
Date: Mon, 10 Oct 2011 19:52:29 -0400
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=6xD4H5TTOF0E0flnhTKkZs3RWfBaMx5qjmVsIfS199A=; b=MBtYq6mgzXhR8LTdA9svuQg33BEzOtu8nG2gmFRXEaQKqKSfREg6+MWjRMDi0fPgiR DvLO49FLkAEP8ZIrsGLNeIgLAH7/lhy1UU0aTbyE7t0EUOL9cf1Jvsj0rZx/CO7TtmQ0 8ORjtCuDMNDZFv5jhDdkGxvHa3KC5RHwqwVwM=
In-reply-to: <4E936BFB.5060907@xxxxxxxx>
References: <201110071352.20135@xxxxxx> <20111007233450.GK3159@dastard> <201110100829.45823@xxxxxx> <CAGpXXZJs8kjZaSp248rA+-d=gpwWe=oK0xtUUirv+zgE3Vq3kA@xxxxxxxxxxxxxx> <4E936BFB.5060907@xxxxxxxx>
On Mon, Oct 10, 2011 at 6:04 PM, Jeffrey Hundstad
<jeffrey.hundstad@xxxxxxxx> wrote:
> On 10/10/2011 03:28 PM, Greg Freemyer wrote:
>>
>> fitrim is the batch mode.
>>
>> To enable realtime discard, add --discard to your mount options.
>>
>> Documented
>> athttp://lxr.linux.no/#linux+v3.0.4/Documentation/filesystems/xfs.txt
>>
>> To invoke batch mode, simply use fstrim from user space.
>
> Hello,
>
> I'm also trying to use FITRIM on a simple XFS partition on a spinning
> magnetic hard drive (remember those).  I haven't had much luck.  I'm doing
> this just to get used to the commands when using this against a thinly
> provisioned disk.  I have no idea if this should work in this configuration.
>
> On a Debian system with Linux 3.0.0-2-amd64 when I issue:
> # fstrim /
>
> I receive:
> fstrim: /: FITRIM ioctl failed: Operation not supported
>
> With an strace this looks like:
> open("/", O_RDONLY)                     = 3
> ioctl(3, 0xc0185879, 0x7fff4ea851b0)    = -1 EOPNOTSUPP (Operation not
> supported)
>
> My fstrim is from util-linux-2.19.1-5
>
> I'd be happy to try to diagnose this further if people are interested.  Any
> suggestions where I should start would be much appreciated.
>
> --
> Jeffrey Hundstad

I just tried it with a 3.1.0-rc9 kernel and had the same problem.

I just checked xfstests group file and see that test 251 (the fstrim
one) is not in the auto group, so I haven't been running it.

Same is true of btrfs and ext4.  I've only been running the auto group
recently.  And mostly against btrfs and ext4.

Hopefully someone can explain it to us both.
Greg

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