Merge lp:~colin-king/ecryptfs/lp-1098584 into lp:ecryptfs

Proposed by Colin Ian King
Status: Merged
Merged at revision: 760
Proposed branch: lp:~colin-king/ecryptfs/lp-1098584
Merge into: lp:ecryptfs
Diff against target: 36 lines (+8/-3)
1 file modified
tests/lib/etl_funcs.sh (+8/-3)
To merge this branch: bzr merge lp:~colin-king/ecryptfs/lp-1098584
Reviewer Review Type Date Requested Status
Tyler Hicks Approve
Review via email: mp+143113@code.launchpad.net

Description of the change

Fix bug LP: #1098584. It appears that btrfs lies about how much free space is available which is doubly problematic with small btrfs partitions of a few GB. To prevent us hitting this, I've increased the amount of slop available to ensure we don't run out of space. Also turn of btrfs COW as this helps and also helps other tests that may cause lots of seek + writes.

To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Looks good. Thanks, Colin!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/lib/etl_funcs.sh'
--- tests/lib/etl_funcs.sh 2012-11-02 23:20:18 +0000
+++ tests/lib/etl_funcs.sh 2013-01-14 14:18:26 +0000
@@ -31,6 +31,7 @@
31default_lmount_opts="rw,relatime"31default_lmount_opts="rw,relatime"
32default_ext2_opts="user_xattr,acl"32default_ext2_opts="user_xattr,acl"
33default_ext3_opts="user_xattr,acl,commit=600,barrier=1,data=ordered"33default_ext3_opts="user_xattr,acl,commit=600,barrier=1,data=ordered"
34default_btrfs_opts="nodatacow"
34default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}"35default_mount_opts="rw,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_sig=\${ETL_FEKEK_SIG}"
35default_fne_mount_opts="${default_mount_opts},ecryptfs_fnek_sig=\${ETL_FNEK_SIG}"36default_fne_mount_opts="${default_mount_opts},ecryptfs_fnek_sig=\${ETL_FNEK_SIG}"
3637
@@ -334,6 +335,9 @@
334 ext3|ext4)335 ext3|ext4)
335 lmount_opts=${default_lmount_opts},${default_ext3_opts}336 lmount_opts=${default_lmount_opts},${default_ext3_opts}
336 ;;337 ;;
338 btrfs)
339 lmount_opts=${default_lmount_opts},${default_btrfs_opts}
340 ;;
337 *)341 *)
338 lmount_opts=$default_lmount_opts342 lmount_opts=$default_lmount_opts
339 ;;343 ;;
@@ -394,10 +398,11 @@
394 btrfs)398 btrfs)
395 # btrfs is a pain, since there is a big difference between the399 # btrfs is a pain, since there is a big difference between the
396 # amount of free space it reports and the maximum size of a file400 # amount of free space it reports and the maximum size of a file
397 # one can produce before filling up the partition. So instead401 # one can produce before filling up the partition, especially
398 # we divide by 2 to ensure we have more than enough free space. 402 # with small partitions. So instead we divide by 4 to ensure
403 # we have more than enough free space.
399 #404 #
400 blks=$((blks / 2))405 blks=$((blks / 4))
401 ;;406 ;;
402 xfs)407 xfs)
403 # xfs misbehaves on small file systems when we truncate, according to408 # xfs misbehaves on small file systems when we truncate, according to

Subscribers

People subscribed via source and target branches