summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-03-22 13:29:15 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-03-22 13:57:22 -0700
commit53cd4267eca7d1bd45cce2d2ce47bc63d278e9b4 (patch)
tree15f88e6174ff94ead741e02c46707ce7f3dac8db
parente54cc5c5541f06a3aefa19c36ddaa3edccb7661f (diff)
downloadvyatta-cfg-53cd4267eca7d1bd45cce2d2ce47bc63d278e9b4.tar.gz
vyatta-cfg-53cd4267eca7d1bd45cce2d2ce47bc63d278e9b4.zip
Bugfix 7267: make inodes allocate dynamically
-rwxr-xr-xetc/init.d/vyatta-router9
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp3
2 files changed, 3 insertions, 9 deletions
diff --git a/etc/init.d/vyatta-router b/etc/init.d/vyatta-router
index 70023d0..2b0aa02 100755
--- a/etc/init.d/vyatta-router
+++ b/etc/init.d/vyatta-router
@@ -184,14 +184,7 @@ start ()
# of the system memory.
local tmem=$(sed -n 's/^MemTotal: \+\([0-9]\+\) kB$/\1/p' /proc/meminfo)
local tpages
- local max_inodes=300000
- if [ -n "$tmem" ]; then
- (( tpages = tmem / 4 ))
- if (( tpages > max_inodes )); then
- (( max_inodes = tpages ))
- fi
- fi
- local tmpfs_opts="nosuid,nodev,mode=775,nr_inodes=$max_inodes"
+ local tmpfs_opts="nosuid,nodev,mode=775,nr_inodes=0" #automatically allocate inodes
mount -o $tmpfs_opts -t tmpfs none ${vyatta_configdir} \
&& chgrp ${GROUP} ${vyatta_configdir}
log_action_end_msg $?
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp
index 04e9975..f8e54d7 100644
--- a/src/cstore/unionfs/cstore-unionfs.cpp
+++ b/src/cstore/unionfs/cstore-unionfs.cpp
@@ -47,7 +47,8 @@ const string UnionfsCstore::C_DEF_CFG_ROOT
= "/opt/vyatta/config";
const string UnionfsCstore::C_DEF_ACTIVE_ROOT
= UnionfsCstore::C_DEF_CFG_ROOT + "/active";
-const string UnionfsCstore::C_DEF_CHANGE_PREFIX = "/tmp/changes_only_";
+const string UnionfsCstore::C_DEF_CHANGE_PREFIX
+ = UnionfsCstore::C_DEF_CFG_ROOT + "/tmp/changes_only_";
const string UnionfsCstore::C_DEF_WORK_PREFIX
= UnionfsCstore::C_DEF_CFG_ROOT + "/tmp/new_config_";
const string UnionfsCstore::C_DEF_TMP_PREFIX