diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-18 05:09:22 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2013-01-18 05:09:22 +0000 |
commit | fd9fe78e14c556c9623d71c9b952fa97b4b279c5 (patch) | |
tree | 7caebae67c45eab6a0fd20c8a1a80e89060ef910 /sys/ntfs/ntfs_vfsops.c | |
parent | 6fc066f972e18a57fae0e5376f520e34678b363f (diff) |
Constrain the amount of kernel memory used by NTFS. Keep a small cache of
loaded ntnodes and once the maximum is reached, unload the least recently
used ntnode before loading a new one. This avoids leaving large data
structures hanging around, which only get cleaned up when the vnode is
reclaimed. Additionally, the buffer cache should contain the data needed
to reload the ntnode.
ok beck@
Diffstat (limited to 'sys/ntfs/ntfs_vfsops.c')
-rw-r--r-- | sys/ntfs/ntfs_vfsops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 44cb3952c0e..fd08a45c480 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.32 2013/01/14 02:41:03 jsing Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.33 2013/01/18 05:09:21 jsing Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -343,6 +343,7 @@ ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp, ntmp->ntm_mode = argsp->mode; ntmp->ntm_flag = argsp->flag; mp->mnt_data = (qaddr_t) ntmp; + TAILQ_INIT(&ntmp->ntm_ntnodeq); /* set file name encode/decode hooks XXX utf-8 only for now */ ntmp->ntm_wget = ntfs_utf8_wget; |