XFS and trim

Eric Sandeen sandeen at redhat.com
Tue Apr 2 14:08:24 UTC 2013


On 4/1/13 5:26 PM, Steven Haigh wrote:
> On 04/02/2013 12:19 AM, Josef Bacik wrote:
>> On Sat, Mar 30, 2013 at 9:38 PM, Steven Haigh <netwiz at crc.id.au> wrote:
>>> Hi all,
>>>
>>> Firstly, Please CC me into replies as I'm not subscribed to this list.
>>>
>>> I'm trying to confirm that Fedora 18 has enabled trim for XFS filesystems. I
>>> have added discard to the mount options in /etc/fstab - however I do not see
>>> it when looking at the output of 'mount':

...

>>> Can anyone share some insight into this?
>>>
>>
>> IIRC you have to rebuild your initrd so it picks up the new fstab
>> mount options for /, the other options is you should be able to do
>> mount -o remount,discard /.  Thanks,
> 
> Hi Josef,
> 
> This was the basis of my query - even after a remount with the
> discard option, 'discard' still wasn't present in the options - as
> seen by the mount line quoted above.

Sorry I didn't see this earlier.  Josef is right; discard is not a remountable
option on xfs, unfortunately (only inode64 and barrier options are remountable
today).  So you could either put the option in the rootflags= kernel
commandline parameter, or rebuild the initrd after adding it to fstab
as Josef suggested so that it's initially mounted with the option.

I wonder if we should add something to the remount path to printk when
a non-remountable option is encountered; I might look into that, otherwise
it's a little surprising (although semi-obvious when the problem doesn't
show up in /prcoc/mounts...).

Thanks,
-Eric


More information about the devel mailing list