public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeffrey Hundstad <jeffrey.hundstad@mnsu.edu>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: TRIM on XFS
Date: Tue, 11 Oct 2011 11:06:24 -0500	[thread overview]
Message-ID: <4E946980.4060702@mnsu.edu> (raw)
In-Reply-To: <20111011020552.GY3159@dastard>

Dave,

Thank you.  I suspected this may be the case.  It is awfully nice to 
have a definitive answer though.  It is especially nice to have a way to 
determine if it is possible.  Thank you!

I've created a an XFS Wiki page for this info:
     http://xfs.org/index.php/FITRIM/discard

-- 
Jeffrey Hundstad

On 10/10/2011 09:05 PM, Dave Chinner wrote:
> On Mon, Oct 10, 2011 at 05:04:43PM -0500, Jeffrey Hundstad 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)
> It means the block device underneath the filesystem doesn't support
> the TRIM operation. Check /sys/block/<dev>/queue/discard_max_bytes -
> if the value is zero then your device doesn't support discard
> operations.
>
> Cheers,
>
> Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-10-11 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:52 TRIM on XFS Michael Monnerie
2011-10-07 23:34 ` Dave Chinner
2011-10-10  6:29   ` Michael Monnerie
2011-10-10 20:28     ` Greg Freemyer
2011-10-10 22:04       ` Jeffrey Hundstad
2011-10-10 23:52         ` Greg Freemyer
2011-10-11  2:05         ` Dave Chinner
2011-10-11 16:06           ` Jeffrey Hundstad [this message]
2011-10-11 22:25             ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E946980.4060702@mnsu.edu \
    --to=jeffrey.hundstad@mnsu.edu \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox