XFS and trim

Eric Sandeen sandeen at redhat.com
Tue Apr 2 18:26:06 UTC 2013


On 4/2/13 9:26 AM, Steven Haigh wrote:
> On 03/04/13 01:08, Eric Sandeen wrote:

snip

>> 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...).
> 
> I think this is probably the best way to handle things. The first
> thing I did was to look at the return code from mount (which returned
> 0 - ie success), then dmesg, then /var/log/messages. As I found
> nothing, I had no hints on where to look.

FWIW, there is some history here w/ returning 0/success for these options:

                        /*
                         * Logically we would return an error here to prevent
                         * users from believing they might have changed
                         * mount options using remount which can't be changed.
                         *
                         * But unfortunately mount(8) adds all options from
                         * mtab and fstab to the mount arguments in some cases
                         * so we can't blindly reject options, but have to
                         * check for each specified option if it actually
                         * differs from the currently set option and only
                         * reject it if that's the case.
                         *
                         * Until that is implemented we return success for
                         * every remount request, and silently ignore all
                         * options that we can't actually change.
                         */
#if 0
                        xfs_info(mp,
                "mount option \"%s\" not supported for remount\n", p);
                        return -EINVAL;
#else
                        break;
#endif

Not great, but there it is.

-Eric


More information about the devel mailing list