directory attribute cache on NFS4 client
Subsystems (2)
First, some info:
NFS4 Client: Fedora 9 - 2.6.25.9-76.fc9.i686 NFS4 Server: Fedora 9 - 2.6.25.6-55.fc9.i686
exportfs: rw,fsid=0,no_root_squash,async
mount: rw,bg,retry=1,timeo=30,rsize=8192,wsize=8192
Both on a local network
The Server act as a filer to a webhosting solution. I have 2 clients (FTP and WebServer). When someone upload and overwrite a file on FTP, normally it do it:
- UPLOAD fileA.tmp
- DELETE fileA
- RENAME fileA.tmp fileA
This operation changes the inode for "fileA" and the WebServer doesn't see the changes, still getting the old file (old inode).
After upload, if I do a "ls -la /path/path/fileA", it returns the old stats (inode, mtime...). But if I do a "ls -la /path/path/" this will refresh info, and get the file correctly.
I've tried the "acdirmin" and "acdirmax" defined to 0, but didn't work. I tried too "noac", really works but the performance cost is expensive.
I really wouldn't like back to NFS3... :)
I'm checking the NFS client code to understand it, and I saw this:
-- inode.c
int nfs_attribute_timeout(struct inode *inode)
{
struct nfs_inode *nfsi = NFS_I(inode);
if (nfs_have_delegation(inode, FMODE_READ))
return 0;--
So, if a inode has a delegation, will it never be timed out, until the delegation been free, right ?
If the delegated inode has been deleted ?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Ricardo Santos
I'm checking the NFS client code to understand it, and I saw this:
--
inode.c
intnfs_attribute_timeout(struct inode *inode){ struct nfs_inode *nfsi = NFS_I(inode); if (nfs_have_delegation(inode, FMODE_READ)) return 0;
Quoted 6 lines
--
So, if a inode has a delegation, will it never be timed out, until the delegation been free, right ?
If the delegated inode has been deleted ?
The server should recall the delegation before allowing the delegated file to be deleted. (The current linux server is buggy--it doesn't do that. Patches are on the way soon, I hope....)
--b.
Has anyway to disable delegations on Linux NFS Server ?
Thanks for help
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Ricardo Santos
Has anyway to disable delegations on Linux NFS Server ?
yes, you can echo 0 to /proc/sys/fs/leases-enable
note that that disables all leases (atop which NFS delegations are
implemented).
d .
Quoted 11 lines
Thanks for help
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines
yes, you can echo 0 to
/proc/sys/fs/leases-enablenote that that disables all leases (atop which NFS delegations are implemented).
david, thanks for the tip. It really works for me!