summaryrefslogtreecommitdiff
path: root/archiso
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-01-02 11:23:44 +0100
committerGerardo Exequiel Pozzi <vmlinuz386@gmail.com>2015-01-02 15:13:36 -0300
commit156b9a6093444f904e01238f8f807bb16da7b6b4 (patch)
treed8fa8f7b7beb6d83d57b14afd1dc284fe2a71cd8 /archiso
parent0b7a77cfc319515cc4ebdb3651ba6283c06cf773 (diff)
downloadarchiso32-156b9a6093444f904e01238f8f807bb16da7b6b4.tar.xz
allow to change dm snapshot chunksize
Copying big amount of data results in bad performance as data is written in chunks of 4kiB (8 * 512 bytes). The default is not changed but can be overwritten. Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'archiso')
-rw-r--r--archiso/initcpio/hooks/archiso3
1 files changed, 2 insertions, 1 deletions
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso
index 1bd9419..3ef4eb1 100644
--- a/archiso/initcpio/hooks/archiso
+++ b/archiso/initcpio/hooks/archiso
@@ -31,7 +31,7 @@ _mnt_fs() {
rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow")
echo ${rw_dev} >> /run/archiso/used_block_devices
- dmsetup create ${dm_snap_name} --table "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} 8"
+ dmsetup create ${dm_snap_name} --table "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} ${cow_chunksize}"
_mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w"
echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices
@@ -112,6 +112,7 @@ run_hook() {
fi
[[ -z "${cow_directory}" ]] && cow_directory="persistent_${archisolabel}/${arch}"
+ [[ -z "${cow_chunksize}" ]] && cow_chunksize="8"
# set mount handler for archiso
mount_handler="archiso_mount_handler"