summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Schröter <adrian@suse.de>2012-10-05 09:24:30 +0200
committerAdrian Schröter <adrian@suse.de>2012-10-05 09:25:05 +0200
commit11ef556a2632d42b79e894777f4865a5d77fc7dd (patch)
treed85bd5538d17afa651dbd43d93cf6f5466a39a17
parentbbec7e32b4d36faa656b9bf942c885d828496a38 (diff)
downloadbuild-11ef556a2632d42b79e894777f4865a5d77fc7dd.tar.gz
build-11ef556a2632d42b79e894777f4865a5d77fc7dd.tar.bz2
build-11ef556a2632d42b79e894777f4865a5d77fc7dd.zip
- go to ext4 default format to support SSD disks better
-rwxr-xr-xbuild14
1 files 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=<VM number> 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=<VM number> 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