From 11ef556a2632d42b79e894777f4865a5d77fc7dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 5 Oct 2012 09:24:30 +0200 Subject: [PATCH] - go to ext4 default format to support SSD disks better --- build | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build b/build index d88c094..5f42aa2 100755 --- a/build +++ b/build @@ -23,7 +23,7 @@ old_packages=() # defaults for vm_img_mkfs vm_img_mkfs_ext4='mkfs.ext4 -m 0 -q -F' -vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal' +vm_img_tunefs_ext4='tune2fs -c 0 -O ^has_journal -o nobarrier,discard' vm_img_mkfs_ext3='mkfs.ext3 -m 0 -q -F' vm_img_tunefs_ext3='tune2fs -c 0 -o journal_data_writeback' vm_img_mkfs_ext2='mkfs.ext2 -m 0 -q -F' @@ -69,7 +69,7 @@ VM_KERNEL= VM_INITRD= VMDISK_ROOTSIZE=4096 VMDISK_SWAPSIZE=1024 -VMDISK_FILESYSTEM=ext3 +VMDISK_FILESYSTEM=ext4 # settings are for speed and not data safety, we format anyway on next run VMDISK_MOUNT_OPTIONS=__default VMDISK_CLEAN= @@ -759,8 +759,7 @@ check_for_ppc() export VM_KERNEL=/boot/vmlinux export VM_INITRD=/boot/initrd if [ -z "$RUNNING_IN_VM" -a "$VM_TYPE" = "kvm" ];then - cat /proc/mounts | grep "/hugetlbfs" &>/dev/null - if [ "$?" != "0" ];then + if ! grep "/hugetlbfs" /proc/mounts; then echo "hugetlbfs is not mounted" exit 1 fi @@ -770,13 +769,11 @@ check_for_ppc() echo "please adjust nr_hugepages" exit 1 fi - grep kvm_rma_count /proc/cmdline &>/dev/null - if [ "$?" != "0" ];then + if ! grep -q kvm_rma_count /proc/cmdline; then echo "put kvm_rma_count= to your boot options" exit 1 fi - grep kvm_hpt_count /proc/cmdline &>/dev/null - if [ "$?" != "0" ];then + if ! grep -q kvm_hpt_count /proc/cmdline; then echo "put kvm_hpt_count= to your boot options" exit 1 fi @@ -802,7 +799,6 @@ shopt -s nullglob if detect_vm_2nd_stage ; then set "/.build-srcdir/$SPECFILE" - fi export PATH=$BUILD_DIR:/sbin:/usr/sbin:$PATH -- 2.7.4