Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2016 11:59:32 -0800 (PST)
From:      Sean Eric Fagan <sef@Kithrup.COM>
To:        freebsd-fs@freebsd.org
Subject:   Re: Monitoring FS changes
Message-ID:  <201601041959.u04JxWGn053360@kithrup.com>

next in thread | raw e-mail | index | archive | help
>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.

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-).




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