Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2002 21:00:04 -0800 (PST)
From:      Boris Popov <bp@freebsd.org>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share
Message-ID:  <200203240500.g2O504B17027@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/29704; it has been noted by GNATS.

From: Boris Popov <bp@freebsd.org>
To: Paul Trunley <paul@trunley.org>
Cc: freebsd-gnats-submit@FreeBSD.org, ppathiakis@homeportfolio.com
Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on
 smbfs mounted share
Date: Sun, 24 Mar 2002 10:58:24 +0600 (ALMT)

 On Fri, 22 Mar 2002, Paul Trunley wrote:
 
 > I believe that this is a problem with smbfs and not with the Identify 
 > utility.  I've included a small program that demonstrates the issue.  On 
 > local filesystems it is permissable to close an fd that had previously been 
 > mmap'd.  The mmap'd region is still accessable.  On an smbfs file this 
 > results in a segmenation fault when the region is accessed.
 > 
 > Boris, I'm working on a patch to fix the problem.  If you want some more 
 > details please feel free to contact me.
 
 	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.
 
 -- 
 Boris Popov
 http://rbp.euro.ru
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203240500.g2O504B17027>