[Yaffs] yaffs2 NFS export issue after server reboot

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Steven Hein
Date:  
To: yaffs
Subject: [Yaffs] yaffs2 NFS export issue after server reboot
Hi All--

I'm having issues with yaffs2 NFS exports
after rebooting the NFS server. Most of the time, clients that
are connected before the server reboot can no longer access the
mount after the server returns.

If I turn on NFS debugging, I see messages like these when
the clients attempt to access the mounts:

nfsd_dispatch: vers 3 proc 1
nfsd: GETATTR(3) 16: 01000101 00000064 00000207 00000000 00000000 00000000
nfsd: fh_verify(16: 01000101 00000064 00000207 00000000 00000000 00000000)
nfsd: Dropping request; may be revisited later

After much debugging, I traced this back to the behavior of
the yaffs2_get_parent().    I found that it was always returning
-ENOMEM, because d_obtain_alias() returned a valid dentry.


I looked at other filesystems type *_get_parent() functions,
and many of them return the result of d_obtain_alias() directly,
so I tried that (effectively removing the "if (!IS_ERR(parent))" block),
and now the client reconnects work correctly. (The only side
effect that I see is that the first attempt to read a directory
within the mount will cause reconnect_path()--the caller of
yaffs2_get_parent()--to return -ESTALE, but all future attempts
always work correctly).

My server is a linux-2.6.35.14 with the YAFFS2 version GIT tagged
"aleph1-release"   (I had previously been running an earlier YAFFS2
version).    This behavior appears to be unique to YAFFS2, as I have
done tests with both YAFFS2 and JFFS2 mounts, and I do not see
the failure on JFFS2 (nor do I see the -ESTALE on the first mount
attempt after server reboot).



I know precious little about NFS filesystems/exports at this level,
so I would appreciate any help or pointers!


Regards,
Steve