2012-02-02 02:24:35

by wangjing

[permalink] [raw]
Subject: could modify sillyrename to put files in /tmp

In nfs v3 ,if mulity process visit nfs mount nfs dir ,there sometimes occour .nfsXXX can't delete .

If modify sillyrename to put files in /tmp ,it will be more friendly to nfs user.


the background
1??Linux fs has /nfsmnt/work_pub/web and /nfsmnt/work_inwork/web ??they use NFS V3 mount
2??there is many process will read and write files in the dir /nfsmnt/work_pub/web
3??cron will del all files in dir /nfsmnt/work_pub/web in period??and will copy all the files which in the dir /nfsmnt/work_inwork/web

in some times delete all files in /nfsmnt/work_pub/web will faild ,because there is some .nfsXXXX



My question is :can i modify nfs_sillyrename funncion in the fs/nfs/dir.c , general all .nfsXXX in /tmp,and make kernel ?




2012-02-02
wangjing
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?


2012-02-02 13:50:38

by Myklebust, Trond

[permalink] [raw]
Subject: Re: could modify sillyrename to put files in /tmp

On Thu, 2012-02-02 at 10:18 +0800, wangjing wrote:
> In nfs v3 ,if mulity process visit nfs mount nfs dir ,there sometimes occour .nfsXXX can't delete .
>
> If modify sillyrename to put files in /tmp ,it will be more friendly to nfs user.

No it wouldn't. Think permissions....

> the background
> 1、Linux fs has /nfsmnt/work_pub/web and /nfsmnt/work_inwork/web ,they use NFS V3 mount
> 2、there is many process will read and write files in the dir /nfsmnt/work_pub/web
> 3、cron will del all files in dir /nfsmnt/work_pub/web in period,and will copy all the files which in the dir /nfsmnt/work_inwork/web
>
> in some times delete all files in /nfsmnt/work_pub/web will faild ,because there is some .nfsXXXX
>
>
>
> My question is :can i modify nfs_sillyrename funncion in the fs/nfs/dir.c , general all .nfsXXX in /tmp,and make kernel ?
>
NACK.


--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
http://www.netapp.com

????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2012-02-03 00:07:47

by Mantas Mikulėnas

[permalink] [raw]
Subject: Re: could modify sillyrename to put files in /tmp

On 2012-02-02 04:18, wangjing wrote:
> In nfs v3 ,if mulity process visit nfs mount nfs dir ,there sometimes occour .nfsXXX can't delete .
>
> If modify sillyrename to put files in /tmp ,it will be more friendly to nfs user.

What would then happen if /tmp was on a separate filesystem than the
original file?

> the background
> 1、Linux fs has /nfsmnt/work_pub/web and /nfsmnt/work_inwork/web ,they use NFS V3 mount
> 2、there is many process will read and write files in the dir /nfsmnt/work_pub/web
> 3、cron will del all files in dir /nfsmnt/work_pub/web in period,and will copy all the files which in the dir /nfsmnt/work_inwork/web
>
> in some times delete all files in /nfsmnt/work_pub/web will faild ,because there is some .nfsXXXX

Then modify the cron job to ignore ".nfs*" files.

--
Mantas M.