mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patches] RFC: Export inode generations to the userland
@ 2002-02-18 21:06 Maciej W. Rozycki
  2002-02-19 10:42 ` Andreas Dilger
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2002-02-18 21:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Trond Myklebust, Olaf Kirch

Hello,

 As you may know, there are serious problems with creating unique file
handles in the userland NFS server.  They exist because the inode
generation number, which allows to determine if an inode was deleted and
recreated, is currently only available to the kernel -- it's by no means
exported to user programs[1].  I've been working to remove this limitation
recently and here I am presenting the results. 

1. Linux was modified to add another member of "struct stat" and "struct
stat64".  The member provides the value of the inode generation at the
time one of the stat syscalls is invoked.  It is named "st_gen" as it is
the name other systems give it (it seems DEC OSF/1 and IBM AIX define this
member currently).  New syscalls have been defined wherever spare space
was not available in "struct stat" or "struct stat64", otherwise only the
semantics of old ones was extended.  Due to its moderate size the patch is
not attached. It's available at:
'ftp://ftp.ds2.pg.gda.pl/pub/macro/st_gen/patches/patch-2.4.16-stat-st_gen-26.gz'. 

2. Glibc was updated to make the Linux change usable.  This is an example
implementation and may seriously differ from what might go into glibc
finally.  The patch is available at: 
'ftp://ftp.ds2.pg.gda.pl/pub/macro/st_gen/patches/glibc-2.2.5-stat-st_gen.patch.gz'. 

3. The userland NFS server was changed to embed the inode generation into
file handles.  The patch is available at: 
'ftp://ftp.ds2.pg.gda.pl/pub/macro/st_gen/patches/nfs-server-2.2beta50-stat.patch.gz'. 

 Patches were tested against versions embedded in their names.  Tests were
successful on an i386 and a mipsel system.  Additionally the Linux patch
was tested as is with Linux 2.4.17 (a 2.4.17 snapshot take on Jan 29th
from oss.sgi.com for mipsel; a slightly modified patch is available at the
site well).  Glibc and nfs-server RPM packages are available at the site
as well.

 I'm looking forward to any constructive comments, whether positive or
critical.  The destined target of the changes is obviously Linux 2.6 and
glibc 2.3; testing of such changes is better with stable versions, though. 
I believe the changes may be useful to other software dealing with
filesystems as well, not only to the NFS server. 

  Maciej

[1] There is that weird EXT2_IOC_GETVERSION ioctl, but it's neither
portable nor usable for anything but maybe debugging.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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

end of thread, other threads:[~2002-02-19 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-18 21:06 [patches] RFC: Export inode generations to the userland Maciej W. Rozycki
2002-02-19 10:42 ` Andreas Dilger
2002-02-19 11:52   ` Maciej W. Rozycki

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

all inboxes | Powered by JetHome®