Re: Bug in NFS
Re: Bug in NFS
- Subject: Re: Bug in NFS
- From: Feng Shuo <email@hidden>
- Date: Sat, 09 Apr 2011 20:59:37 +0800
Thank you. The Bug ID is #
9261749.
On Sat, Apr 9, 2011 at 00:42, Shantonu Sen
<email@hidden> wrote:
Great!
On Apr 8, 2011, at 3:03 AM, Feng Shuo wrote:
Hi all,
I found a bug in NFS client namespace management. The scenario would like to be:
- If there is a "a.mov" in the NFS share, on client side open a finder to display the share, then close the finder window.
- Rename the "a.mov" to "b.mov" in the NFS server.
- On client side, open the same directory/share with finder again, you will see "b.mov".
- Double click "b.mov", you might find you can not play it.
This issue at least can be reproduced in Mac OS X 10.6.7 (and older 10.6.x systems). I did some trace:
- In #1, a.mov will be loaded to the nfs file handle cache.
- In #2, only the name of the file is changed, but not the file handle.
- In #3, nfs_vnop_readdir will find the directory be updated and reload all the name cache, but vnode.v_name is not updated because cache_purge will not handle this.
- In #4, if you do a "lookup" to "b.mov", the same vnode will be returned because the file handle is not changed. But if you do a "getattrlist", which is largely called by Quicktime and many Mac OS X applications, the "ATTR_CMN_NAME" will still return the old v_name (a.mov). This will make applications unable to open it if they what to use the CMN_NAME.
Attached is a patch for this issue. I use vnode_update_identity() to update the v_name. :-)
Any comments?
--
Feng Shuo
Tel: (86)10-59851155-2116
Fax: (86)10-59851155-2008
Tianjin Zhongke Blue Whale Information Technologies Co., Ltd
Postcode 100080
10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue
Haidian District, Beijing
<nfs_v_name.patch> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
This email sent to email@hidden
--
Feng Shuo
Tel: (86)10-59851155-2116
Fax: (86)10-59851155-2008
Tianjin Zhongke Blue Whale Information Technologies Co., Ltd
Postcode 100080
10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue
Haidian District, Beijing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden