Bug 55119 - udisks: Mount failed: Mount option discard is not allowed
Summary: udisks: Mount failed: Mount option discard is not allowed
Status: RESOLVED WONTFIX
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 19:53 UTC by Paul Menzel
Modified: 2012-09-28 17:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Paul Menzel 2012-09-19 19:53:25 UTC
Mounting a SSD partition with an ext4 file system with the discard option fails.

    $ sudo udisks --mount /dev/sde16 --mount-options discard
    Mount failed: Mount option discard is not allowed

Using mount directly works as expected.

    $ sudo mount -o discard /dev/sde16 /mnt/
    $ echo $?
    0
Comment 1 Paul Menzel 2012-09-19 19:54:29 UTC
This is Debian Sid/unstable.

ii  udisks                        1.0.4-7             i386                storage media interface
Comment 2 Paul Menzel 2012-09-19 20:01:36 UTC
The Debian BTS tracks this issue under the bug number 688145.


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688145
Comment 3 David Zeuthen (not reading bugmail) 2012-09-28 17:01:57 UTC
Development focus is on udisks 2.0 but it's still a "problem" there.

My view is pretty simple - if it's useful to use TRIM and TRIM is available, the ext4 filesystem driver should do it by default. The mount(5) man page seems to agree since it says "it is off by default until sufficient testing has been done".

So I don't think it's a good idea to allow an unprivileged user to use 'discard' via udisks since the feature has not seen sufficient testing and it could be a security hole until it has. So I'm closing WONTFIX.

You can of course work around this by just adding an entry to the /etc/fstab line for the device. We even have a nice GUI for this in Disks, see

 http://davidz25.blogspot.com/2012/03/simpler-faster-better.html

for details.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.