LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-13-2007, 07:35 AM   #1
sandyman
LQ Newbie
 
Registered: Dec 2006
Posts: 5

Rep: Reputation: 0
NFS and JFFS2 in 2.6.23-rc3


Hi,

I hope this is the right forum to post this question, to me it seemed the best match.

I have a problem regarding mounting a JFFS2 partition using NFS. I am using kernel 2.6.20 on my (embedded) system, which I had to patch in order to get this working:

Code:
Index: linux-2.6.16/fs/jffs2/super.c
===================================================================
diff -u -r1.1 -r1.2
--- linux-2.6.16/fs/jffs2/super.c	6 Jun 2006 16:18:24 -0000	1.1
+++ linux-2.6.16/fs/jffs2/super.c	6 Sep 2006 14:14:37 -0000	1.2
@@ -80,6 +80,10 @@
 	.sync_fs =	jffs2_sync_fs,
 };
 
+/* Just declare a void structure as A NULL value implies the default */
+static struct export_operations jffs2_export_ops;
+
+
 static int jffs2_sb_compare(struct super_block *sb, void *data)
 {
 	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;
 
 	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,
 };
 
 static int __init init_jffs2_fs(void)
See: http://mhonarc.axis.se/jffs-dev/msg01865.html

However, I've updated to kernel 2.6.23-rc3, and now I have some weird problem mounting this partition over NFS. Mounting seems to work just fine, and I can even do ls and see the files that are on the partition. However, as soon as I try to access a file (e.g., using cat), I get the error message:

cat: /usr/local/script.sh: Stale NFS file handle

Creating a file also seems to work, e.g.

echo "Test" > /usr/local/test.txt

seems to work, the file is actually created. However, it turns out to be empty when catting it...

Has anyone got a clue as to what might have changed in the recent kernels that could trigger this problem?

Thanks,
Sander
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
openwrt: jffs2 or squashfs almost000 Linux - Newbie 1 07-11-2007 01:07 PM
writing into JFFS2 filesystem Deepak Inbasekaran Programming 0 06-26-2006 03:23 AM
How do I create a jffs2 loopback image? rjlee Linux - General 0 04-22-2006 12:02 PM
JFFS2 mount on SuSE 9.3 fails gargamel SUSE / openSUSE 6 09-08-2005 03:09 PM
JFFS2 (Flash ROM) Eileen Programming 0 01-12-2005 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration