Bug 31450 - udisks: implement remount support
Summary: udisks: implement remount support
Status: NEW
Alias: None
Product: udisks
Classification: Unclassified
Component: operations (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-07 15:20 UTC by Steven Mueller
Modified: 2015-11-16 08:16 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
[Patch 1/3] Extend the DBUS interface by MountOptions property (9.46 KB, patch)
2015-11-16 08:06 UTC, Daniel Mueller
Details | Splinter Review
[Patch 2/3] Add support for remount option (9.94 KB, patch)
2015-11-16 08:07 UTC, Daniel Mueller
Details | Splinter Review
[Patch 3/3] Handle MountOptions property as path-options-pairs (3.27 KB, patch)
2015-11-16 08:12 UTC, Daniel Mueller
Details | Splinter Review

Description Steven Mueller 2010-11-07 15:20:32 UTC
I propose:
 - add a org.freedesktop.UDisks.Device.FilesystemRemount(in 'as' options) method to the dbus interface
 - add --remount and --remount-options command-line options to udisks, where the argument to --remount can be either a device file path or a mount point (like --unmount)
 - remount would require the requester have permissions to both mount and unmount the device

Alternatively, the interface could act like mount and just special-case the remount option for the FilesystemMount method and udisks --mount option, but I don't think that would be as clean.

I can produce a patch for this if the udisks maintainers deem this a valuable enough feature to include.

Rationale for remount vs. unmount/mount:
 - you get to keep your current mount options
 - faster than unmounting/remounting for both the user and the system
 - ensures you stay with the same mountpoint
 - convenience of being able to specify either the device file or the mount point

Motivation:
 - Downloading photos from flash media: to minimize the window during which corruption could take place, it would be nice to mount the media read-only during transfer.  This is at odds with the default behavior of Gnomes volume manager, which mounts rw.  Having a scriptable mechanism that doesn't require sudo would streamline this sequence: remount-ro, copy data off, remount-rw, update a tracking file of which images have been transfered, unmount.
 - Mounting flash media sync, but switching to async for writing large amounts of data.

Reference - remount support in hal:
http://lists.freedesktop.org/archives/hal-commit/2006-September/002708.html
Comment 1 Daniel Mueller 2015-11-16 08:06:10 UTC
Created attachment 119695 [details] [review]
[Patch 1/3] Extend the DBUS interface by MountOptions property
Comment 2 Daniel Mueller 2015-11-16 08:07:05 UTC
Created attachment 119696 [details] [review]
[Patch 2/3] Add support for remount option
Comment 3 Daniel Mueller 2015-11-16 08:12:57 UTC
Created attachment 119698 [details] [review]
[Patch 3/3] Handle MountOptions property as path-options-pairs
Comment 4 Daniel Mueller 2015-11-16 08:16:54 UTC
I've added support for the "-o remount" remount option and extended the DBUS interface by "MountOptions" property.

[Patch 0001] extends the DBUS interface by the MountOptions property, which
holds the mounts options corresponding to the MountPoints property.
It also allows an application to be notified by DBUS PropertiesChanged signal
when the mount options of an mounted FS have changed (e.g. FS remounted
read-only).

[Patch 0002] adds support for the mount -o remount option allowing to remount a
already mounted FS via DBUS (and udisksctl).

[Patch 0003] changes type of MountOptions property to path-options-pairs.

Please consider those changes for inclusion into next version.


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.