[Port-solaris] Re: vn_setpath

Frank Batschulat (private) frank.batschulat@drusus.de
Tue, 08 Jan 2013 23:13:53 +0100


On Tue, 08 Jan 2013 23:07:29 +0100, Frank Batschulat (private) <frank.batschulat@drusus.de> wrote:

>>> Btw, we've noticed something else you want to fix in afs_inactive():
>>>
>>> 1674     /*
>>> 1675      * Solaris calls VOP_OPEN on exec, but doesn't call VOP_CLOSE when
>>> 1676      * the executable exits.  So we clean up the open count here.
>>> 1677      *
>>> 1678      * Only do this for mvstat 0 vnodes: when using fakestat, we can't
>>> 1679      * lose the open count for volume roots (mvstat 2), even though they
>>> 1680      * will get VOP_INACTIVE'd when released by afs_PutFakeStat().
>>> 1681      */
>>>
>>> We have fixed the overall VOP_CLOSE() is missing in the exec path
>>> problem since Solaris 11 build 135.  This code above should be
>>> disabled in Solaris 11 and later. VOP_CLOSE() is called on exec (on
>>> the old executable), and exit and we also call VOP_OPEN on fork().
>>> However it is not fixed in Solaris 10.
>>
>> That build number does not mean a lot to me; does that mean it's in
>> every public Solaris 11 release?
>
> yes it is, build 135 pre-dates Solaris 11 GA by quite a bit, its even in
> the OpenSolaris code base before the "closure"
>
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/vnode.c#3022
>
> so you are good to go for Openindiana/Illumos as well in case you care about them.

oh I just noticed this was for the vn_renamepath() above in the context of the VOP_CLOSE()
question. for VOP_CLOSE() see:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/exec.c#533

http://src.opensolaris.org/source/history/onnv/onnv-gate/usr/src/uts/common/os/exec.c

 11736:63a134e1f09c 	 	22-Feb-2010 	Donghai Qiao  	4492533 Filesystems may need VOP_CLOSE() for executables following a VOP_OPEN()

cheers
frankB