summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorGerald Thornbrugh <Gerald.Thornbrugh@Sun.COM>2009-09-11 07:02:39 -0600
committerGerald Thornbrugh <Gerald.Thornbrugh@Sun.COM>2009-09-11 07:02:39 -0600
commitfbd8dcf988ac639217a2bdb4287206afb8b347b6 (patch)
tree20030bb0f1c984ef9ed118e5f169f9c4df96af0b /usr/src
parenta0bebf46d0192802cf12a474ebd3738383096769 (diff)
downloadillumos-joyent-fbd8dcf988ac639217a2bdb4287206afb8b347b6.tar.gz
6802893 /var/nfs/v4_state fills up with tons of entries; prevents NFS service from starting.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/fs/nfs/nfs4_state.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_state.c b/usr/src/uts/common/fs/nfs/nfs4_state.c
index 75c77727c9..ef0f2c800b 100644
--- a/usr/src/uts/common/fs/nfs/nfs4_state.c
+++ b/usr/src/uts/common/fs/nfs/nfs4_state.c
@@ -1545,8 +1545,10 @@ rfs4_client_expiry(rfs4_entry_t u_entry)
rfs4_client_t *cp = (rfs4_client_t *)u_entry;
bool_t cp_expired;
- if (rfs4_dbe_is_invalid(cp->rc_dbe))
+ if (rfs4_dbe_is_invalid(cp->rc_dbe)) {
+ cp->rc_ss_remove = 1;
return (TRUE);
+ }
/*
* If the sysadmin has used clear_locks for this
* entry then forced_expire will be set and we
@@ -1568,9 +1570,21 @@ rfs4_client_expiry(rfs4_entry_t u_entry)
static void
rfs4_dss_remove_cpleaf(rfs4_client_t *cp)
{
+ rfs4_servinst_t *sip;
char *leaf = cp->rc_ss_pn->leaf;
- rfs4_dss_remove_leaf(cp->rc_server_instance, NFS4_DSS_STATE_LEAF, leaf);
+ /*
+ * since the state files are written to all DSS
+ * paths we must remove this leaf file instance
+ * from all server instances.
+ */
+
+ mutex_enter(&rfs4_servinst_lock);
+ for (sip = rfs4_cur_servinst; sip != NULL; sip = sip->prev) {
+ /* remove the leaf file associated with this server instance */
+ rfs4_dss_remove_leaf(sip, NFS4_DSS_STATE_LEAF, leaf);
+ }
+ mutex_exit(&rfs4_servinst_lock);
}
static void