Re: Query related to lookup
Re: Query related to lookup
- Subject: Re: Query related to lookup
- From: Ken Hornstein <email@hidden>
- Date: Thu, 28 Mar 2013 21:28:38 -0400
>[...]
>On mac osx, we receive lookup only once. Being a remote file system we
>would like to invalidate / revalidate name cache periodically.
>
>Does darwin kernel provide anyway to invalidate name cache periodically?
There is two sources of documentation for the Darwin VFS interface that
I'm aware of: the kernel source code, and the headers. To be perfectly
honest ... I'm surprised you were able to port a Linux filesystem to
MacOS X without having gone through those things with a fine-tooth comb,
because I can tell you from personal experience I certainly spent what
seemed like days staring at those things :-)
But anyway, check out the following file:
/System/Library/Frameworks/Kernel.framework/Headers/sys/vnode.h
Specifically, the comments for the function "cache_purge()". Also, as
I understand it your file doesn't actually get added to the name cache
unless you call cache_enter(); you could simply not call cache_enter()
in your vnop_lookup routine (although I would personally not recommend
that). If you want to do that for _all_ cached vnodes in your filesystem,
you could combine that with vnode_iterate().
--Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden