Re: Can a write vnop occur after close when mmap'd?
Re: Can a write vnop occur after close when mmap'd?
- Subject: Re: Can a write vnop occur after close when mmap'd?
- From: Terry Lambert <email@hidden>
- Date: Thu, 9 Jul 2009 13:04:36 -0700
On Jul 9, 2009, at 11:45 AM, Rick Macklem wrote:
Hi,
I recently discovered that, on FreeBSD, it is possible to have read/
write
vnops occur for a vnode after the close vnop when the file is
mmap'd. The
Leopard man page seems to suggest that the same is true for Leopard,
but
that might just be because the man page was copied from FreeBSD.
When I
looked in xnu-1228, I got lost:-)
So, can VNOP_READ() and/or VNOP_WRITE() calls happen after
VNOP_CLOSE()
when the vnode has been mmap'd on Leopard?
For FreeBSD, because of the above, I had to move the NFSv4 Close Ops
into
vop_inactive(). If the answer to the above is "yes", would the I/O be
done by the time VNOP_INACTIVE() is called? (--> so the same fix
should
work)
Yes.
Once a file system vends a vnode, it has to expect that VNOPs will be
called on that vnode until such time as the vnode is released back to
the FS for disposal of its associated in-core data structures.
This tends to be a pain for client file systems of Windows servers,
since traditionally Windows did has not permitted renames, removals,
etc., since they don't want to treat the vnode vend as an over-the-
wire-open. I doubt NFSv4 has the directory change issues Windows has,
but being connection oriented, it's going to have to act the same way
with regard to vnode lifecycle.
-- Terry
_______________________________________________
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