diskimage-builder/diskimage_builder/block_device
Andreas Florath fa6c731132 Move fstrim to block device layer
The call to fstrim in disk-image-create is currently useless, because
at the time this is called, the file systems were already umounted by
the block device layer.

The current implementation of the block-device mount plugin does not
call fstrim at all: resulting in larger image sizes.

This patch removes the useless fstrim call from the disk-image-create
script and moves this into the block-device mount.py.

The resulting image might be much smaller.  Example: Ubuntu Xenial
with some elements; once with and once without this patch:

-rw-r--r-- 1 dib dib 475661824 Sep 16 06:43 ubuntu-xenial-without-fstrim.qcow2
-rw-r--r-- 1 dib dib 364249088 Sep 16 09:30 ubuntu-xenial-with-fstrim.qcow2

Change-Id: I4e21ae50c5e6e26dc9f50f004ed6413132c81047
Signed-off-by: Andreas Florath <andreas@florath.net>
2017-09-28 17:48:59 +10:00
..
level0 Move rollback into NodeBase object 2017-06-08 17:14:20 +10:00
level1 LVM support for dib-block-device 2017-08-24 16:22:56 +10:00
level2 The correct option for label name in fat and vfat is '-n' 2017-07-15 22:48:52 -04:00
level3 Move fstrim to block device layer 2017-09-28 17:48:59 +10:00
level4 Move rollback into NodeBase object 2017-06-08 17:14:20 +10:00
tests Move fstrim to block device layer 2017-09-28 17:48:59 +10:00
__init__.py Clear __init__.py from cmd move 2017-05-11 18:52:14 +10:00
blockdevice.py Pass all blockdevices to bootloader 2017-06-08 17:14:22 +10:00
cmd.py Refactor: use lazy logging 2017-05-30 14:39:58 +10:00
config.py Add state to NodeBase class 2017-06-08 17:13:26 +10:00
exception.py Move exception to it's own file (again) 2017-05-20 06:44:39 +00:00
plugin.py Move rollback into NodeBase object 2017-06-08 17:14:20 +10:00
utils.py Refactor mount-point sorting 2017-05-31 11:05:50 +10:00