Monitoring FS changes

Rick Macklem rmacklem at uoguelph.ca
Tue Jan 5 02:22:37 UTC 2016


Sean Eric Fagan wrote:
> >The generic problem we have there is quite different. Assume that
> >we establish a new monitor on a directory, and assume there exists
> >previously open file, which vnode should be now monitored by the
> >'children' rule. How can we learn that the vnode must be included in the
> >watching set, i.e. marked ? Same issue occurs for fhopen() and for NFS
> >handles.
> 
> xnu solved that by putting a parent pointer in each vnode (obviously, not set
> for non-fs objects).  Once they did that, this kept a reference for each
> vnode, and voila, always there.
> 
Just wondering how they handle the case of multiple hard links in different directories?

rick

> They also keep a reference cache of names; this makes a lot more sense on a
> Mac OS system since so many directories and files have the same name
> (there are 9400 instances of "Info.plist" on my laptop at the moment, for
> example).
> 
> The memory footprint for each of these was not too large.  But, then, Apple
> wasn't supporting systems with less than 1gbytes of ram at the time 8-).
> 
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
> 


More information about the freebsd-fs mailing list