Date: Tue, 3 Feb 2015 18:42:30 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r278163 - user/pho/stress2/misc Message-ID: <201502031842.t13IgUlW006609@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Tue Feb 3 18:42:28 2015 New Revision: 278163 URL: https://svnweb.freebsd.org/changeset/base/278163 Log: Rename test program and cleanup script. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/newfs4.sh Modified: user/pho/stress2/misc/newfs4.sh ============================================================================== --- user/pho/stress2/misc/newfs4.sh Tue Feb 3 18:33:23 2015 (r278162) +++ user/pho/stress2/misc/newfs4.sh Tue Feb 3 18:42:28 2015 (r278163) @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2008 Peter Holm <pho@FreeBSD.org> +# Copyright (c) 2008-2013 Peter Holm <pho@FreeBSD.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -39,45 +39,45 @@ odir=`pwd` cd /tmp -sed '1,/^EOF/d' < $odir/$0 > io.c -cc -o io -Wall io.c -rm -f io.c +sed '1,/^EOF/d' < $odir/$0 > newfs4.c +cc -o newfs4 -Wall -Wextra newfs4.c +rm -f newfs4.c cd $odir -mount | grep "$mntpoint" | grep md${mdstart}${part} > /dev/null && umount $mntpoint +mount | grep "$mntpoint" | grep -q md${mdstart}$part && umount $mntpoint mdconfig -l | grep md$mdstart > /dev/null && mdconfig -d -u $mdstart size=9 # Gb -[ `df -k $(dirname $diskimage) | tail -1 | awk '{print $4'}` -lt $((size * 1024 * 1024)) ] && \ - echo "Not enough disk space." && exit 1 +[ `df -k $(dirname $diskimage) | tail -1 | \ + awk '{print $4'}` -lt $((size * 1024 * 1024)) ] && \ + echo "Not enough disk space on `dirname $diskimage`." && exit 1 truncate -s ${size}G $diskimage blocksize="-b 65536" opt="-O2 -U" mdconfig -a -t vnode -f $diskimage -u $mdstart bsdlabel -w md$mdstart auto -newfs $blocksize $opt md${mdstart}${part} > /dev/null -mount /dev/md${mdstart}${part} $mntpoint +newfs $blocksize $opt md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint cd $mntpoint truncate -s 2g f1 truncate -s 2g f2 truncate -s 2g f3 truncate -s 2g f4 -/tmp/io f1 & -/tmp/io f2 & -/tmp/io f3 & -/tmp/io f4 & -wait;wait;wait;wait +/tmp/newfs4 f1 & +/tmp/newfs4 f2 & +/tmp/newfs4 f3 & +/tmp/newfs4 f4 & +wait -while mount | grep "$mntpoint" | grep -q md${mdstart}${part}; do - umount -f $mntpoint > /dev/null 2>&1 +while mount | grep "$mntpoint" | grep -q md${mdstart}$part; do + umount -f $mntpoint || sleep 1 done mdconfig -d -u $mdstart rm -f $diskimage -rm -f $RUNDIR/fsx.$$.* -rm -f /tmp/io +rm -f /tmp/newfs4 exit EOF
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502031842.t13IgUlW006609>