Merge lp:~binli/ubuntu/trusty/casper/overlayfs into lp:ubuntu/trusty/casper

Proposed by Bin Li
Status: Merged
Merge reported by: Adam Conrad
Merged at revision: not available
Proposed branch: lp:~binli/ubuntu/trusty/casper/overlayfs
Merge into: lp:ubuntu/trusty/casper
Diff against target: 69 lines (+23/-6)
2 files modified
debian/changelog (+14/-0)
scripts/casper (+9/-6)
To merge this branch: bzr merge lp:~binli/ubuntu/trusty/casper/overlayfs
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+256113@code.launchpad.net

Description of the change

Support newer overlayfs in newer kernel.(LP: #1401620, LP: #1412411)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-04-09 18:47:09 +0000
+++ debian/changelog 2015-04-14 09:00:51 +0000
@@ -1,3 +1,17 @@
1casper (1.341) UNRELEASED; urgency=medium
2
3 [Andy Whitcroft]
4 * scripts/casper: switch up to overlayfs V2 format (overlay filesystem
5 type) when available. (LP: #1412411)
6
7 * scripts/casper: move union content into a subdirectory of the /cow
8 device, to allow us to create a workdir where that is needed for
9 overlayfs. Also attempt to mount overlayfs with and without the
10 workdir= to cope with the semantic change in newer kernels.
11 (LP: #1401620)
12
13 -- Bin Li <bin.li@canonical.com> Tue, 14 Apr 2015 16:49:31 +0800
14
1casper (1.340) trusty; urgency=medium15casper (1.340) trusty; urgency=medium
216
3 * Remove 23etc_modules which does more harm than good (LP: #1296386)17 * Remove 23etc_modules which does more harm than good (LP: #1296386)
418
=== modified file 'scripts/casper'
--- scripts/casper 2014-03-19 14:22:36 +0000
+++ scripts/casper 2015-04-14 09:00:51 +0000
@@ -380,7 +380,7 @@
380 rootmnt="$2"380 rootmnt="$2"
381381
382 if [ "${UNIONFS}" = 'DEFAULT' ]; then382 if [ "${UNIONFS}" = 'DEFAULT' ]; then
383 for union in 'overlayfs' 'aufs' 'unionfs'383 for union in 'overlay' 'overlayfs' 'aufs' 'unionfs'
384 do384 do
385 modprobe "${MP_QUIET}" -b ${union} || true385 modprobe "${MP_QUIET}" -b ${union} || true
386 if cut -f2 /proc/filesystems | grep -q "^${union}\$"; then386 if cut -f2 /proc/filesystems | grep -q "^${union}\$"; then
@@ -461,17 +461,18 @@
461 fi461 fi
462462
463 mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow"463 mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow"
464 mkdir -p /cow/upper /cow/work
464465
465 case ${UNIONFS} in466 case ${UNIONFS} in
466 unionfs-fuse)467 unionfs-fuse)
467 (ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:$rofsstring "$rootmnt" || panic "${UNIONFS} mount failed")468 (ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow/upper=RW:$rofsstring "$rootmnt" || panic "${UNIONFS} mount failed")
468 mkdir -p /dev/.initramfs/varrun469 mkdir -p /dev/.initramfs/varrun
469 pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true470 pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true
470 ;;471 ;;
471 aufs|unionfs)472 aufs|unionfs)
472 mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed"473 mount -t ${UNIONFS} -o noatime,dirs=/cow/upper=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed"
473 ;;474 ;;
474 overlayfs)475 overlay|overlayfs)
475 # Mount the layers pairwise from the bottom onto rootmnt,476 # Mount the layers pairwise from the bottom onto rootmnt,
476 # for the second and later layers rootmnt forms the lower layer.477 # for the second and later layers rootmnt forms the lower layer.
477 mounts=""478 mounts=""
@@ -486,8 +487,10 @@
486 lower="$mount"487 lower="$mount"
487 continue488 continue
488 fi489 fi
489 mount -t overlayfs -o "upperdir=$mount,lowerdir=$lower" \490 mount -t ${UNIONFS} -o "upperdir=$mount/upper,lowerdir=$lower,workdir=$mount/work" \
490 "$mount" "$rootmnt"491 "$mount" "$rootmnt" || \
492 mount -t ${UNIONFS} -o "upperdir=$mount/upper,lowerdir=$lower" \
493 "$mount" "$rootmnt"
491 lower="$rootmnt"494 lower="$rootmnt"
492 done495 done
493 ;;496 ;;

Subscribers

People subscribed via source and target branches

to all changes: