All of lore.kernel.org
 help / color / mirror / Atom feed
* Reiser4 and NFS
@ 2004-09-06 12:53 Oliver Korpilla
  2004-09-07  7:57 ` Vladimir Saveliev
  0 siblings, 1 reply; 6+ messages in thread
From: Oliver Korpilla @ 2004-09-06 12:53 UTC (permalink / raw)
  To: reiserfs-list

Hello!

I've recently upgraded my Debian Sarge to use a Reiser4 as a root filesystem out 
of curiosity.

I've been doing development on this box, involving serving a root filesystem to 
an embedded target via NFS.

My box (the host) is a vanilla kernel.org Linux 2.6.8.1-mm1 with 
reiser-all.diff.gz patchset. It's configured to serve NFSv3.

The target has a TimeSys 2.4.21 (realtime) Linux kernel with NFSv3 client support.

Before that, I've used 2.4.26 with an ext3 filesystem, and everything went fine. 
Then I've upgraded kernel and my root filesystem (to Reiser4, I surely consider 
that an upgrade! ;) ), and I get NFS error -45 (Operation not supported), when 
target wants to do the LOOKUP operation (I can see that on Ethereal).

I've found a similar error occuring when serving VFAT partitions over NFS:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-02/7848.html

I've switched the particular subtree of my root FS that I want to serve via NFS 
back to ext3, and the problem is gone, so this problem is clearly rooted in the 
interaction between NFS and Reiser4.

If I were to do a wild guess, I'd say: Since both VFAT and Reiser4 directory 
semantics differ from "standard Unix" (or at least ext*) conventions, this is 
interferring with the NFS LOOKUP operation, don't you think?

I'll be glad to provide any additional information if required.

Thanks and with kind regards,
Oliver Korpilla

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reiser4 and NFS
  2004-09-06 12:53 Reiser4 and NFS Oliver Korpilla
@ 2004-09-07  7:57 ` Vladimir Saveliev
  2004-09-07  8:05   ` Oliver Korpilla
  2004-09-08 12:00   ` Oliver Korpilla
  0 siblings, 2 replies; 6+ messages in thread
From: Vladimir Saveliev @ 2004-09-07  7:57 UTC (permalink / raw)
  To: Oliver Korpilla; +Cc: reiserfs-list

Hello

On Mon, 2004-09-06 at 16:53, Oliver Korpilla wrote:
> Hello!
> 
> I've recently upgraded my Debian Sarge to use a Reiser4 as a root filesystem out 
> of curiosity.
> 
> I've been doing development on this box, involving serving a root filesystem to 
> an embedded target via NFS.
> 
> My box (the host) is a vanilla kernel.org Linux 2.6.8.1-mm1 with 
> reiser-all.diff.gz patchset. It's configured to serve NFSv3.
> 
> The target has a TimeSys 2.4.21 (realtime) Linux kernel with NFSv3 client support.
> 
> Before that, I've used 2.4.26 with an ext3 filesystem, and everything went fine. 
> Then I've upgraded kernel and my root filesystem (to Reiser4, I surely consider 
> that an upgrade! ;) ), and I get NFS error -45 (Operation not supported), when 
> target wants to do the LOOKUP operation (I can see that on Ethereal).
> 
> I've found a similar error occuring when serving VFAT partitions over NFS:
> http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-02/7848.html
> 
> I've switched the particular subtree of my root FS that I want to serve via NFS 
> back to ext3, and the problem is gone, so this problem is clearly rooted in the 
> interaction between NFS and Reiser4.
> 
> If I were to do a wild guess, I'd say: Since both VFAT and Reiser4 directory 
> semantics differ from "standard Unix" (or at least ext*) conventions, this is 
> interferring with the NFS LOOKUP operation, don't you think?
> 
> I'll be glad to provide any additional information if required.
> 

I have no problems with exporting reiser4 via NFS. Could it be that you
have problem because your client is embedded?

> Thanks and with kind regards,
> Oliver Korpilla
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reiser4 and NFS
  2004-09-07  7:57 ` Vladimir Saveliev
@ 2004-09-07  8:05   ` Oliver Korpilla
  2004-09-07 14:00     ` Vladimir Saveliev
  2004-09-08 12:00   ` Oliver Korpilla
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Korpilla @ 2004-09-07  8:05 UTC (permalink / raw)
  To: Vladimir Saveliev; +Cc: reiserfs-list

Hello Vladimir,

I guess not.

Both my clients are embedded systems, and both didn't work.

Client/Target one is a Motorola MVME2100 board with an MPC8240 PowerPC CPU @ 200
MHz.

Client/Target two is a Motorola MVME5500 board with an MPC7455 PowerPC CPU @ 1GHz.

Both failed to mount their root filesystem via NFS from a Reiser4 on the
server/host, but worked fine with an ext3 over NFS.

Either this is a NFSv3/Reiser4/2.6.8.1 server vs. NFSv3/2.4.21 client problem,
or it has something to do with endianness (PowerPC is big-endian, Intel P4 box
is little-endian). I know ext* has absolutely no issues with endianness, neither
as RAM disk nor over NFS, but perhaps Reiser4 has?

Do both your client and your server have kernel 2.6.x? Are both Reiser4 patched?

Maybe Linux 2.6.x has new LOOKUP operation semantics in order to support Reiser4
that Linux 2.4.2x hasn't?

On a side note:

It would be nice if we could reproduce the error, since I like Reiser4. I did a
large egrep over the whole /usr subtree, and didn't hear a sound from my hard
drive because accesses seemed to be well-ordered (no superfluous head
movements). I first thought the operation failed. ;)

With kind regards,
Oliver Korpilla

Vladimir Saveliev wrote:
> I have no problems with exporting reiser4 via NFS. Could it be that you
> have problem because your client is embedded?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reiser4 and NFS
  2004-09-07  8:05   ` Oliver Korpilla
@ 2004-09-07 14:00     ` Vladimir Saveliev
  2004-09-07 14:18       ` Oliver Korpilla
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Saveliev @ 2004-09-07 14:00 UTC (permalink / raw)
  To: Oliver Korpilla; +Cc: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

Hello

On Tue, 2004-09-07 at 12:05, Oliver Korpilla wrote:
> Hello Vladimir,
> 
> I guess not.
> 
> Both my clients are embedded systems, and both didn't work.
> 
> Client/Target one is a Motorola MVME2100 board with an MPC8240 PowerPC CPU @ 200
> MHz.
> 
> Client/Target two is a Motorola MVME5500 board with an MPC7455 PowerPC CPU @ 1GHz.
> 
> Both failed to mount their root filesystem via NFS from a Reiser4 on the
> server/host, but worked fine with an ext3 over NFS.
> 
> Either this is a NFSv3/Reiser4/2.6.8.1 server vs. NFSv3/2.4.21 client problem,
> or it has something to do with endianness (PowerPC is big-endian, Intel P4 box
> is little-endian). I know ext* has absolutely no issues with endianness, neither
> as RAM disk nor over NFS, but perhaps Reiser4 has?
> 
Yes, that could be a problem.
Would you please try to patch reiser4/vfs_ops.c with the attached patch
and let us know whether it makes any effect?


> Do both your client and your server have kernel 2.6.x? Are both Reiser4 patched?
> 
> Maybe Linux 2.6.x has new LOOKUP operation semantics in order to support Reiser4
> that Linux 2.4.2x hasn't?
> 
> On a side note:
> 
> It would be nice if we could reproduce the error, since I like Reiser4. I did a
> large egrep over the whole /usr subtree, and didn't hear a sound from my hard
> drive because accesses seemed to be well-ordered (no superfluous head
> movements). I first thought the operation failed. ;)
> 
> With kind regards,
> Oliver Korpilla
> 
> Vladimir Saveliev wrote:
> > I have no problems with exporting reiser4 via NFS. Could it be that you
> > have problem because your client is embedded?
> 
> 

[-- Attachment #2: vfs_ops.c.diff --]
[-- Type: text/plain, Size: 880 bytes --]

===== vfs_ops.c 1.732 vs edited =====
--- 1.732/vfs_ops.c	2004-08-30 17:05:53 +04:00
+++ edited/vfs_ops.c	2004-09-07 15:38:55 +04:00
@@ -1564,12 +1564,16 @@
 	addr = (char *)data;
 
 	need = encode_inode_size(inode);
-	if (need < 0)
+	if (need < 0) {
+		printk("reiser4_encode_fh-1: need=%d\n", need);
 		return NFSERROR;
+	}
 	if (need_parent) {
 		delta = encode_inode_size(parent);
-		if (delta < 0)
+		if (delta < 0) {
+			printk("reiser4_encode_fh-2: delta=%d\n", delta);
 			return NFSERROR;
+		}
 		need += delta;
 	}
 
@@ -1584,9 +1588,11 @@
 		 * handle. */
 		*lenp = (need + sizeof(__u32) - 1) >> 2;
 		result = need_parent ? FH_WITH_PARENT : FH_WITHOUT_PARENT;
-	} else
+	} else {
 		/* no enough space in file handle */
+		printk("reiser4_encode_fh-3: need=%d, lenp=%d\n", need, *lenp);
 		result = NFSERROR;
+	}
 	reiser4_exit_context(&context);
 	return result;
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reiser4 and NFS
  2004-09-07 14:00     ` Vladimir Saveliev
@ 2004-09-07 14:18       ` Oliver Korpilla
  0 siblings, 0 replies; 6+ messages in thread
From: Oliver Korpilla @ 2004-09-07 14:18 UTC (permalink / raw)
  To: Vladimir Saveliev; +Cc: reiserfs-list

Compiling and installing the patch remotely while writing this, but I 
can test it with both client and server tomorrow, about 20 hrs from now. 
I'll let you know the results.

With kind regards,
Oliver Korpilla

Vladimir Saveliev wrote:

>>Either this is a NFSv3/Reiser4/2.6.8.1 server vs. NFSv3/2.4.21 client problem,
>>or it has something to do with endianness (PowerPC is big-endian, Intel P4 box
>>is little-endian). I know ext* has absolutely no issues with endianness, neither
>>as RAM disk nor over NFS, but perhaps Reiser4 has?
>>    
>>
>Yes, that could be a problem.
>Would you please try to patch reiser4/vfs_ops.c with the attached patch
>and let us know whether it makes any effect?
>
>  
>
>>===== vfs_ops.c 1.732 vs edited =====
>>--- 1.732/vfs_ops.c	2004-08-30 17:05:53 +04:00
>>+++ edited/vfs_ops.c	2004-09-07 15:38:55 +04:00
>>@@ -1564,12 +1564,16 @@
>> 	addr = (char *)data;
>> 
>> 	need = encode_inode_size(inode);
>>-	if (need < 0)
>>+	if (need < 0) {
>>+		printk("reiser4_encode_fh-1: need=%d\n", need);
>> 		return NFSERROR;
>>+	}
>> 	if (need_parent) {
>> 		delta = encode_inode_size(parent);
>>-		if (delta < 0)
>>+		if (delta < 0) {
>>+			printk("reiser4_encode_fh-2: delta=%d\n", delta);
>> 			return NFSERROR;
>>+		}
>> 		need += delta;
>> 	}
>> 
>>@@ -1584,9 +1588,11 @@
>> 		 * handle. */
>> 		*lenp = (need + sizeof(__u32) - 1) >> 2;
>> 		result = need_parent ? FH_WITH_PARENT : FH_WITHOUT_PARENT;
>>-	} else
>>+	} else {
>> 		/* no enough space in file handle */
>>+		printk("reiser4_encode_fh-3: need=%d, lenp=%d\n", need, *lenp);
>> 		result = NFSERROR;
>>+	}
>> 	reiser4_exit_context(&context);
>> 	return result;
>> }
>>    
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reiser4 and NFS
  2004-09-07  7:57 ` Vladimir Saveliev
  2004-09-07  8:05   ` Oliver Korpilla
@ 2004-09-08 12:00   ` Oliver Korpilla
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Korpilla @ 2004-09-08 12:00 UTC (permalink / raw)
  To: Vladimir Saveliev; +Cc: reiserfs-list

Famous last log entries: ;)

On the target (NFSv3 client):

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.1.1
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem).
nfs_stat_to_errno: bad nfs status return value: 45
mount_devfs_fs(): unable to mount devfs, err: -5
Freeing unused kernel memory: 236k init
nfs_stat_to_errno: bad nfs status return value: 45
Warning: unable to open an initial console.
nfs_stat_to_errno: bad nfs status return value: 45
nfs_stat_to_errno: bad nfs status return value: 45
nfs_stat_to_errno: bad nfs status return value: 45
nfs_stat_to_errno: bad nfs status return value: 45
Rebooting in 180 seconds..

On the host (NFSv3 server):

Sep  8 13:50:31 ppcproject1 rpc.mountd: authenticated mount request from 
192.168.1.4:800 for /opt/devel/powerpc/rootfs (/opt/devel/powerpc/rootfs)
Sep  8 13:50:32 ppcproject1 kernel: reiser4_encode_fh-3: need=36, lenp=5
Sep  8 13:50:32 ppcproject1 last message repeated 5 times

Guess we've tripped a wire here! It triggered one of your printks...

With kind regards,
Oliver Korpilla

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-08 12:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-06 12:53 Reiser4 and NFS Oliver Korpilla
2004-09-07  7:57 ` Vladimir Saveliev
2004-09-07  8:05   ` Oliver Korpilla
2004-09-07 14:00     ` Vladimir Saveliev
2004-09-07 14:18       ` Oliver Korpilla
2004-09-08 12:00   ` Oliver Korpilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.