summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2009-08-26 20:43:24 +0300
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2009-08-26 20:43:24 +0300
commit4d4eadbdb37a664b1fbf42fe1cdcb3a75dbb4342 (patch)
tree851384df1cf5b67183861541a7faea293a2cd87e
parentfb9c3699177b33695206a7dd052e629d4455fe56 (diff)
Add some information about file handles.
-rw-r--r--hurd/interface/fs/17.mdwn19
1 files changed, 19 insertions, 0 deletions
diff --git a/hurd/interface/fs/17.mdwn b/hurd/interface/fs/17.mdwn
index 0fa18cf7..8895434a 100644
--- a/hurd/interface/fs/17.mdwn
+++ b/hurd/interface/fs/17.mdwn
@@ -20,3 +20,22 @@ Return a file handle for this file. This can be used by NFS and such. It is
not guaranteed that this call will work; if it doesn't, then this filesystem
cannot be NFS mounted.
+Currently file handles are only used by `nfsd` with the purpose of
+having some stable representation of nodes (TODO: Add references).
+The only translator library that implements `file_getfh` and the
+complementary [[`fsys_getfile`|fsys_getfile]] is `libdiskfs`, so if
+you are linking against a different library you should expect that the
+filesystem exported by your translator will not be supported by `nfsd`
+by default.
+
+If you would like your non-`libdiskfs` translator to be supported by
+`nfsd`, you should implement these two RPCs on your own. The idea is
+that to each node exported by your translator you should put in
+correspondence a unique file handle. A file handle is a 28-byte
+value. The first 4 bytes are not used. Then comes a 4-byte number
+which should identify your node somehow (`libdiskfs` uses the index
+into the internally maintained node cache). After it there comes a
+4-byte number which should bear a similar function to the `st_gen`
+field of a `stat` structure. Following this specification, you should
+be able to implement `file_getfh` and `fsys_getfile` in a proper way
+to get `nfsd` support.