Hi all,
With yaffs1 on kernel 2.4.18 we managed to export a yaffs1 filesystem by nfs.
Now I saw on a 2.6.16 kernel with yaffs2 we can't.
I found that a changed was made in nfs, and now they test if
s_export_op is not a void pointer.
Adding a pointer on this structure makes the yaffs2 filesystem
exportable by nfs.
I joined my little patch for review, if the solution is ok, we could
add this patch on yaffs2.
--
Gregory CLEMENT
Adeneo
Index: linux-2.6.16/fs/yaffs2/yaffs_fs.c
===================================================================
RCS file: /home/compactmts/rwe/system/linux-2.6.16/fs/yaffs2/yaffs_fs.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6.16/fs/yaffs2/yaffs_fs.c 9 Jun 2006 06:42:34 -0000 1.1
+++ linux-2.6.16/fs/yaffs2/yaffs_fs.c 6 Sep 2006 14:15:17 -0000 1.2
@@ -216,6 +216,10 @@
.clear_inode = yaffs_clear_inode,
};
+
+/* Just declare a void structure as A NULL value implies the default */
+static struct export_operations yaffs_export_ops;
+
static void yaffs_GrossLock(yaffs_Device * dev)
{
T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs locking\n"));
@@ -1321,6 +1325,7 @@
sb->s_magic = YAFFS_MAGIC;
sb->s_op = &yaffs_super_ops;
+ sb->s_export_op = &yaffs_export_ops;
if (!sb)
printk(KERN_INFO "yaffs: sb is NULL\n");