瀏覽單個文章
cmwang
Elite Member
 

加入日期: May 2002
您的住址: 板橋
文章: 5,112
鵝後來找到Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share....

引用:
Yes, this is an expected behavior - smbfs uses a counter to track open/close operations and if it became zero, an SMB "close" request sent to server. Obviously, mmap() doesn't give additional VOP_OPEN() call and file is really closed after close(), so any subsequent read/write operation will fail.

In the DOS/Windows world it is normal to have strong relation between open/close operations, while VOP_OPEN()/VOP_CLOSE() in FreeBSD do not match sometime (I'm suspect that it is possible to remove inconsistence, though).

One of the possible solutions is to remove smb_close request from smbfs_close() vop and leave it only in the smbfs_inactive(), but this will not allow programs to immediately release a file by just closing it.


看來是FreeBSD對VOP_OPEN/VOP_CLOSE的解釋造成的,難怪從十幾年前就是這樣了....
 
舊 2016-09-19, 06:05 PM #2
回應時引用此文章
cmwang離線中