Re: [Yaffs] NFS and YAFFS

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] NFS and YAFFS
On Saturday 16 February 2008 04:46:45 wrote:
> All,
>
> We had a problem perhaps similar, The problem was associated to the
> “READDIR+” NFS V3 command, which recursively explores the sub-directories,
> trying to lock for the sub-directories the semaphore that was already
> locked for the first directory, causing a deadlock of the NFS server.
> This problem was solved by another engineer with the next modification (not
> very clean!!):
>
> cvs diff fs/yaffs2/yaffs_fs.c
> Index: fs/yaffs2/yaffs_fs.c
> ===================================================================
> RCS file: linux-2.6.16/fs/yaffs2/yaffs_fs.c,v
> retrieving revision 1.4
> diff -r1.4 yaffs_fs.c
> 313c313,314
> <       yaffs_GrossLock(dev);
> ---

>
> >       if (current != dev->readdirProcess)
> >               yaffs_GrossLock(dev);

>
> 324a326
>
> 326c328,329
> <       yaffs_GrossUnlock(dev);
> ---

>
> >       if (current != dev->readdirProcess)
> >               yaffs_GrossUnlock(dev);

>
> 816a820
>
> >       dev->readdirProcess = current ;

>
> 885a890
>
> >       dev->readdirProcess = NULL ;

>
> 1288c1293,1294
> <       yaffs_GrossLock(dev);
> ---

>
> >       if (current != dev->readdirProcess)
> >               yaffs_GrossLock(dev);

>
> 1294c1300,1301
> <       yaffs_GrossUnlock(dev);
> ---

>
> >       if (current != dev->readdirProcess)
> >               yaffs_GrossUnlock(dev);

>
> cvs diff fs/yaffs2/yaffs_guts.h
> Index: fs/yaffs2/yaffs_guts.h
> ===================================================================
> RCS file: linux-2.6.16/fs/yaffs2/yaffs_guts.h,v
> retrieving revision 1.1
> diff -r1.1 yaffs_guts.h
> 655a656,657
>
> >       struct task_struct *readdirProcess;

>
> cvs diff include/linux/jffs2_fs_i.h
> Index: include/linux/jffs2_fs_i.h
> ===================================================================
> RCS file: linux-2.6.16/include/linux/jffs2_fs_i.h,v
> retrieving revision 1.1.1.1
> diff -r1.1.1.1 jffs2_fs_i.h
> 18c18
> <
> ---
>
> >       struct task_struct *readdir_process;

>
> If this patch could be helpfull
>
> Best regards
>
> Olivier


Thanx for that.

Could you repost the diff in patch form:

#dif -Naur old new

That will be most helpful.

Thanx

-- Charles