]> git.hungrycats.org Git - linux/commitdiff
[PATCH] - kNFSd in 2.5.15 - export_operations support for isofs
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 10 May 2002 02:31:19 +0000 (19:31 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 10 May 2002 02:31:19 +0000 (19:31 -0700)
ISOFS to use export_operations to declare exportability

Exporting ISO's has never been very reliable
as lookup("..") doesn't work (even though there is
some code that tries to pretend that it does).

This means that if an inode falls out of cache, any
filehandle on it will become stale.

This makes that level of support explicit with an empty
export_operations structure.  get_parent could be written....
but not today.

fs/isofs/inode.c

index 2589f9717e21f7e4193e99ff90d15f700abc1fe3..08d4a148495b9ef4b55987c037e55367d5037c36 100644 (file)
@@ -131,6 +131,21 @@ static struct super_operations isofs_sops = {
        statfs:         isofs_statfs,
 };
 
+/* the export_operations structure for describing
+ * how to export (e.g. via kNFSd) is deliberately
+ * empty.
+ * This means that the filesystem want to use iget
+ * to map an inode number into an inode.
+ * The lack of a get_parent operation means that 
+ * if something isn't in the cache, then you cannot
+ * access it.
+ * It should be possible to write a get_parent,
+ * but it would be a bit hairy...
+ */
+static struct export_operations isofs_export_ops = {
+};
+
+
 static struct dentry_operations isofs_dentry_ops[] = {
        {
                d_hash:         isofs_hash,
@@ -786,6 +801,7 @@ root_found:
        }
 #endif
        s->s_op = &isofs_sops;
+       s->s_export_op = &isofs_export_ops;
        sbi->s_mapping = opt.map;
        sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
        sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/