nfs4 doesn't reflect inode->i_blocks immediately?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In vanilla 2.6.32, I mount nfs4 on localhost: /n/export is the exported
point; /n/lower is the client-side mount point.  I tried these two commands
in rapid succession:

# cp /bin/ls /n/lower/ls ; stat /bin/ls /n/lower/ls /n/export/ls
  File: `/bin/ls'
  Size: 93560     	Blocks: 192        IO Block: 4096   regular file
Device: 301h/769d	Inode: 98160       Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2009-12-05 18:14:30.000000000 -0500
Modify: 2007-10-31 09:13:32.000000000 -0400
Change: 2008-03-23 18:02:54.000000000 -0400
  File: `/n/lower/ls'
  Size: 93560     	Blocks: 0          IO Block: 262144 regular file
Device: fh/15d	Inode: 212599      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (  100/   users)
Access: 2009-12-05 22:35:53.000000000 -0500
Modify: 2009-12-05 22:35:53.000000000 -0500
Change: 2009-12-05 22:35:53.000000000 -0500
  File: `/n/export/ls'
  Size: 93560     	Blocks: 192        IO Block: 4096   regular file
Device: 301h/769d	Inode: 212599      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (  100/   users)
Access: 2009-12-05 22:35:53.000000000 -0500
Modify: 2009-12-05 22:35:53.000000000 -0500
Change: 2009-12-05 22:35:53.000000000 -0500

The NFS server sees the inode size/blocks correctly; the NFS client,
OTOH, only sees the inode size correctly.  If I wait a few seconds, then the
client's inode size and blocks become correct.  I can easily reproduce
this.  It doesn't happen with nfs2/3, only nfs4.

So, why this discrepancy?  Why does i_size become immdiately correct while
i_blocks takes a few seconds.  This is messing up my regression suites which
run on top of nfs4.  Plus, doesn't this violate some posix spec?

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

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux