[Merge] lp:~xnox/ubuntu/trusty/mountall/remount into lp:ubuntu/mountall
Dmitrijs Ledkovs
launchpad at surgut.co.uk
Thu Dec 5 10:43:29 UTC 2013
Dmitrijs Ledkovs has proposed merging lp:~xnox/ubuntu/trusty/mountall/remount into lp:ubuntu/mountall.
Requested reviews:
Upstart Reviewers (upstart-reviewers)
Related bugs:
Bug #1039887 in mountall (Ubuntu): "fstab does not honor /proc mount options"
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/1039887
For more details, see:
https://code.launchpad.net/~xnox/ubuntu/trusty/mountall/remount/+merge/197840
This is one way to implement/fix "fstab does not honor /proc mount options".
The actual problem is: mount-points are remounted, only if currently mounted "ro" and "ro was not requested.
Implementation is to convert current/requested mount options from character array, to NihHash and then compare the two sets of mount options. I don't like this approach as it is buggy in many subtle ways:
- "complement" options are not parsed properly, e.g. -orw,ro,rw are stored as RW and RO keys.
- ordering of the options is no longer preserved
- requested options, are not necessarily the same after successful mount, e.g. "defaults" get expanded, no-op options are dropped (tmpfs gid=0), relative options expanded (size=10%) etc.
What I think a better approach is to:
- when mountall starts mark up all mountpoints that we didn't mount
- remount them once
That should be a more simple and more robust approach.
I'm leaving code here for now, in case someone wants to pick it up / review. There are other useful changes in this branch (e.g. test-cases and general clean-up).
--
The attached diff has been truncated due to its size.
https://code.launchpad.net/~xnox/ubuntu/trusty/mountall/remount/+merge/197840
Your team Upstart Reviewers is requested to review the proposed merge of lp:~xnox/ubuntu/trusty/mountall/remount into lp:ubuntu/mountall.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 524288 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20131205/4f39bc1c/attachment-0001.diff>
More information about the upstart-devel
mailing list