Linux NFS development
 help / color / mirror / Atom feed
* directory attribute cache on NFS4 client
@ 2008-08-29 13:42 Ricardo Santos
  2008-09-01 16:40 ` Ricardo Santos
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Santos @ 2008-08-29 13:42 UTC (permalink / raw)
  To: linux-nfs

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... :)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: directory attribute cache on NFS4 client
  2008-08-29 13:42 directory attribute cache on NFS4 client Ricardo Santos
@ 2008-09-01 16:40 ` Ricardo Santos
       [not found]   ` <loom.20080901T163528-489-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Santos @ 2008-09-01 16:40 UTC (permalink / raw)
  To: linux-nfs

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 ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: directory attribute cache on NFS4 client
       [not found]   ` <loom.20080901T163528-489-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
@ 2008-09-02 17:50     ` J. Bruce Fields
  2008-09-02 19:52       ` Ricardo Santos
  0 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2008-09-02 17:50 UTC (permalink / raw)
  To: Ricardo Santos; +Cc: linux-nfs

On Mon, Sep 01, 2008 at 04:40:04PM +0000, Ricardo Santos wrote:
> 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 ?

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: directory attribute cache on NFS4 client
  2008-09-02 17:50     ` J. Bruce Fields
@ 2008-09-02 19:52       ` Ricardo Santos
       [not found]         ` <loom.20080902T195042-521-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Santos @ 2008-09-02 19:52 UTC (permalink / raw)
  To: linux-nfs

Has anyway to disable delegations on Linux NFS Server ?

Thanks for help





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: directory attribute cache on NFS4 client
       [not found]         ` <loom.20080902T195042-521-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
@ 2008-09-02 20:11           ` david m. richter
  2008-09-03  2:57             ` Ricardo Santos
  0 siblings, 1 reply; 6+ messages in thread
From: david m. richter @ 2008-09-02 20:11 UTC (permalink / raw)
  To: Ricardo Santos; +Cc: linux-nfs

On Tue, 2 Sep 2008, Ricardo Santos wrote:

> 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
	.

> 
> Thanks for help
> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: directory attribute cache on NFS4 client
  2008-09-02 20:11           ` david m. richter
@ 2008-09-03  2:57             ` Ricardo Santos
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Santos @ 2008-09-03  2:57 UTC (permalink / raw)
  To: linux-nfs

> yes, you can echo 0 to /proc/sys/fs/leases-enable
> 
> note that that disables all leases (atop which NFS delegations are 
> implemented).

david, thanks for the tip. It really works for me!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-03  2:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 13:42 directory attribute cache on NFS4 client Ricardo Santos
2008-09-01 16:40 ` Ricardo Santos
     [not found]   ` <loom.20080901T163528-489-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2008-09-02 17:50     ` J. Bruce Fields
2008-09-02 19:52       ` Ricardo Santos
     [not found]         ` <loom.20080902T195042-521-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2008-09-02 20:11           ` david m. richter
2008-09-03  2:57             ` Ricardo Santos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox