Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2015 20:35:31 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r278632 - user/pho/stress2/misc
Message-ID:  <201502122035.t1CKZVh6088626@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Thu Feb 12 20:35:30 2015
New Revision: 278632
URL: https://svnweb.freebsd.org/changeset/base/278632

Log:
  Limit file system size.
  
  Sponsored by:	 EMC / Isilon storage division

Modified:
  user/pho/stress2/misc/tmpfs11.sh

Modified: user/pho/stress2/misc/tmpfs11.sh
==============================================================================
--- user/pho/stress2/misc/tmpfs11.sh	Thu Feb 12 19:45:07 2015	(r278631)
+++ user/pho/stress2/misc/tmpfs11.sh	Thu Feb 12 20:35:30 2015	(r278632)
@@ -40,12 +40,13 @@ mp2=${mntpoint}2
 md1=$mdstart
 md2=$((mdstart + 1))
 
+size=$((`sysctl -n hw.usermem` / 1024 / 1024 / 2))
 mount | grep $mp1 | grep -q tmpfs && umount -f $mp1
-mount -t tmpfs tmpfs $mp1
+mount -o size=${size}m -t tmpfs tmpfs $mp1
 chmod 777 $mp1
 
 mount | grep $mp2 | grep -q tmpfs && umount -f $mp2
-mount -t tmpfs tmpfs $mp2
+mount -o size=${size}m -t tmpfs tmpfs $mp2
 chmod 777 $mp2
 
 export runRUNTIME=15m



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502122035.t1CKZVh6088626>