This should take care of the persistent extra disk usage that's seen after
copying files via NFS. A few issues were causing this:
1) A temporary increase is by design, this is pre-allocation in action,
coupled with a reference cache to improve NFS performance.
2) Linux is no longer calling sync on idle filesystems; this was
the trigger to bump entries out of the refcache, which would
then allow the pre-alloc'd space to be freed.
3) Inodes that were in the refcache, and then replaced by new
inodes, weren't getting pre-alloc'd space freed.
These were resolved by the following.
1) is still with us; the cache purging is still quite slow,
this might be a candidate for a tuneable parameter. But, it's
a feature, not a bug. :)
2) After purging some entries from the refcache, a timer is set
to dirty the superblock, assuring that we'll purge more entries
via sync even if the filesystem is idle.
3) Added a call to VOP_RELEASE in xfs_rwunlock to _really_ let
go of the inode.
Date: Tue Sep 18 13:56:42 PDT 2001
The following file(s) were checked into:
linux/fs/xfs/xfs_rw.h - 1.60
- update prototype for xfs_refcache_purge_some to include mountpoint arg
linux/fs/xfs/xfs_rw.c - 1.345
- Add timer to mark sb dirty even if filesystem is idle.
This ensures we'll keep purging the nfs refcache.
Modify xfs_refcache_purge_some to pass in mount point, so we can get
linux/fs/xfs/xfs_vnodeops.c - 1.512
- Update linux inode block count after pre-alloced space is freed.
Call VOP_RELEASE when releasing inodes bumped from the refcache.
linux/fs/xfs/xfs_vfsops.c - 1.324
- call xfs_refcache_purge_some with mp argument