A query about the solution for NFS to mount jffs2 file system

xin zheng xin.zheng at alliedtelesis.co.nz
Tue Mar 6 20:52:56 EST 2007


Hello:

On my kernel (version 2.6.16.29), I can not mount a jffs2 filesystem by
NFS (NFS works well for other file systems). 

Here is my situation. I have a NFS server running with IP address
172.16.35.20, it has the /etc/exports with the following entry:

/flash 172.16.35.1/32(rw,async,no_subtree_check,no_root_squash)

/flash is a jffs2 filesystem

And I have NFS client with IP address 172.16.35.1. When I try to mount
/flash, I get an error looks like:

mount -t nfs 172.16.35.20:/flash /mnt
mount: 172.16.35.20:/flash failed, reason given by server: Permission
denied

I saw some discussions about this kind of problem on the following
link:

http://www.infradead.org/pipermail/linux-mtd/2006-September/016496.html

Then I did the fixes given there:
Made the two Change inlinux-2.6.29/fs/jffs2/super.c ,
 	struct jffs2_sb_info *p = data;
@@ -150,6 +154,7 @@
 	spin_lock_init(&c->inocache_lock);

 	sb->s_op = &jffs2_super_operations;
+	sb->s_export_op = &jffs2_export_ops;
 	sb->s_flags = flags | MS_NOATIME;

AND

ret = jffs2_do_fill_super(sb, data, (flags&MS_VERBOSE)?1:0);
@@ -314,6 +319,7 @@
 	.name =		"jffs2",
 	.get_sb =	jffs2_get_sb,
 	.kill_sb =	jffs2_kill_sb,
+	.fs_flags = FS_REQUIRES_DEV,
 };

ALSO, I changed the /etc/exports file entry to:
/flash
172.16.35.1/32(rw,async,no_subtree_check,no_root_squash,fsid=32505856)

THEN, I try mounting again by executing:
mount -t nfs 172.16.35.20:/flash /mnt

It DO mount correctly. BUT, when I try to access the mounted
directory:
> ls /mnt

It is just dead, no output, can not be killed.

I am wondering are there anything wrong in my previous operations. OR
are there any solutions, patches can fix this problem so that the jffs2
file system can be mounted and accessed correctly ON NFS.

Cheers,
Shane




NOTICE: This message contains privileged and confidential
information intended only for the use of the addressee
named above. If you are not the intended recipient of
this message you are hereby notified that you must not
disseminate, copy or take any action in reliance on it.
If you have received this message in error please
notify Allied Telesis Labs Ltd immediately.
Any views expressed in this message are those of the
individual sender, except where the sender has the
authority to issue and specifically states them to
be the views of Allied Telesis Labs.




More information about the linux-mtd mailing list