From b7d8f9ddb290fe23af4d62b812e66fb5bf563e1d Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 22 Mar 2012 13:29:15 -0700 Subject: Bugfix 7267: make inodes allocate dynamically --- etc/init.d/vyatta-router | 9 +-------- src/cstore/unionfs/cstore-unionfs.cpp | 3 ++- 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 -- cgit v1.2.3