Merge lp://qastaging/~xnox/ubuntu/trusty/mountall/remount into lp://qastaging/ubuntu/trusty/mountall

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: lp://qastaging/~xnox/ubuntu/trusty/mountall/remount
Merge into: lp://qastaging/ubuntu/trusty/mountall
Diff against target: 50480 lines (+512/-49588)
25 files modified
.bzrignore (+39/-0)
Makefile.in (+0/-873)
aclocal.m4 (+0/-1175)
apport/Makefile.in (+0/-556)
conf/Makefile.in (+0/-579)
config.guess (+0/-1552)
config.h.in (+0/-401)
config.sub (+0/-1788)
configure (+0/-20995)
configure.ac (+7/-1)
dbus/Makefile.in (+0/-561)
debian/changelog (+15/-0)
debian/control (+1/-1)
debian/initramfs/Makefile.in (+0/-570)
debian/initramfs/upstart-jobs/Makefile.in (+0/-556)
debian/rules (+1/-1)
ltmain.sh (+0/-9661)
m4/libtool.m4 (+0/-7991)
man/Makefile.in (+0/-634)
src/Makefile.am (+25/-0)
src/Makefile.in (+0/-831)
src/fstab (+2/-2)
src/mountall.c (+273/-104)
src/tests/test_mountall.c (+149/-0)
util/Makefile.in (+0/-756)
To merge this branch: bzr merge lp://qastaging/~xnox/ubuntu/trusty/mountall/remount
Reviewer Review Type Date Requested Status
Upstart Reviewers Pending
Review via email: mp+197840@code.qastaging.launchpad.net

Description of the change

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).

To post a comment you must log in.

Unmerged revisions

466. By Dimitri John Ledkov

Skip remounting placeholder mountpoints.

465. By Dimitri John Ledkov

and skip no-op requested mount options

464. By Dimitri John Ledkov

and account for mountinfo representing mode in octal without leading 0

463. By Dimitri John Ledkov

Remount each mount point at most once.

462. By Dimitri John Ledkov

add more compare options diff

461. By Dimitri John Ledkov

unless requested mount option value is relative, ends with '%'

460. By Dimitri John Ledkov

Set /sys/fs/cgroup size to 4k (the default)

459. By Dimitri John Ledkov

Remount filesystems, if requested and current mount options are
different (LP: #1039887)

458. By Dimitri John Ledkov

Convert opts/mount_opts for character array to NihHash.

457. By Dimitri John Ledkov

Add test framework, and needs_remount unit tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches