Thread (3 messages) 3 messages, 3 authors, 2012-05-09

Re: Extended file stat: Splitting file- and fs-specific info?

From: Bernd Schubert <hidden>
Date: 2012-05-09 14:12:57
Also in: linux-cifs, linux-ext4, linux-fsdevel, linux-nfs

On 05/09/2012 03:51 PM, Andreas Dilger wrote:
On 2012-05-09, at 6:25 AM, Bernd Schubert wrote:
quoted
On 05/09/2012 02:05 PM, Christoph Hellwig wrote:
quoted
On Wed, May 09, 2012 at 01:55:16PM +0200, Bernd Schubert wrote:
quoted
The basic idea of generation numbers is to check if an inode was
recycled, so only if the tuple of inode-number and generation-number
matches we still have the same file. Kernel nfs
NFS does not and should not look at the inode generation.  Except for a
bit of legacy code for the old pre-Linux 2.4 filehandles it looks at the
opaque file handle returned and only interpreted by the filesystem.  Any
userspace NFS server should do the same.
Ok, I didn't look how kernel NFS does it for quite some time already...
User space NFS only can do it beginning with 2.6.39 - given that user space also needs to support older kernels and other OSs, which might not have open_by_handle, userspace unfortunately cannot entirely rely on that feature.
But even fewer kernels have sys_statxat() in them (i.e. none), so you can rely on that even less than open_by_handle()...
Well, I didn't say that :) In summary, an application needs to try to 
use the open-by-handle call and if that is not supported, it has to fall 
back to traditional stat and generation-number-ioctl. And as I said 
before, open-by-handle very likely removes the requirement for 
generation numbers in sys_statxat().


Cheers,
Bernd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help