Merge lp:~stgraber/ubuntu/trusty/initramfs-tools-ubuntu-touch/enable-discard into lp:ubuntu/trusty/initramfs-tools-ubuntu-touch

Proposed by Stéphane Graber
Status: Merged
Approved by: Oliver Grawert
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~stgraber/ubuntu/trusty/initramfs-tools-ubuntu-touch/enable-discard
Merge into: lp:ubuntu/trusty/initramfs-tools-ubuntu-touch
Diff against target: 26 lines (+7/-1)
2 files modified
debian/changelog (+6/-0)
scripts/touch (+1/-1)
To merge this branch: bzr merge lp:~stgraber/ubuntu/trusty/initramfs-tools-ubuntu-touch/enable-discard
Reviewer Review Type Date Requested Status
Oliver Grawert Approve
Review via email: mp+198998@code.launchpad.net

Description of the change

Adds discard (TRIM) support when mounting the main writable block device (userdata).

This has been confirmed to work (device still boots fine) on mako and grouper. The way the flag works in the kernel, it should be fine on any device, if the underlying block device doesn't support it, it'll simply be ignored.

I'm not setting this flag for any of the loop mounted partitions because those are typically read-only anyway (so nothing to TRIM) and support of TRIM on ext2 loop-mounted over ext4 isn't particularly clear.

To post a comment you must log in.
Revision history for this message
Oliver Grawert (ogra) wrote :

If you are sure it will just be ignored and not cause data loss or anything on MMCs that do not support it, then go ahead. Approved ...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-11-25 17:43:03 +0000
3+++ debian/changelog 2013-12-13 20:45:15 +0000
4@@ -1,3 +1,9 @@
5+initramfs-tools-ubuntu-touch (0.64) UNRELEASED; urgency=low
6+
7+ * Enable discard (TRIM) for the userdata partition.
8+
9+ -- Stéphane Graber <stgraber@ubuntu.com> Fri, 13 Dec 2013 14:50:24 -0500
10+
11 initramfs-tools-ubuntu-touch (0.63) trusty; urgency=low
12
13 * Workaround behaviour change in busybox where loop mounted fs that
14
15=== modified file 'scripts/touch'
16--- scripts/touch 2013-11-25 17:42:56 +0000
17+++ scripts/touch 2013-12-13 20:45:15 +0000
18@@ -81,7 +81,7 @@
19 echo "initrd: mounting $path" >/dev/kmsg || true
20
21 # Mount the data partition to a temporary mount point
22- mount $path /tmpmnt
23+ mount -o discard $path /tmpmnt
24
25 # Loop-mounted flipped model
26 if [ -e /tmpmnt/system.img ]; then

Subscribers

People subscribed via source and target branches