kernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.
* Allow directory hierarchies to be selected for data caching when
using vm.swapcache.data_enable.
* Add the vm.swapcache.use_chflags sysctl which defaults to ON and
enables use of the new chflags flags to determine what directory
trees the swapcache will cache data from.
* Add chflags cache and noscache. The flags are tracked recursively
by the namecache and do *NOT* have to be set recursively in the
directory tree. Setting a flag in a top-level directory is sufficient
to cover the entire subtree.
chflags cache - Any regular file in the subtree will be cached
by swapcache.
chflags noscache - Disables any swapcacheing of data in the subtree,
overrides any use of chflags cache in the subtree.
NOTE: Only applies to file data. The caching of file meta-data by
swapcache is controlled globally by vm.swapcache.meta_enable and
ignores chflags flags..
* Adjust the manual pages for swapcache and chflags.
* NOTE! The default has been changed to require the use of chflags, data
caching will not occur unless you either turn off the
vm.swapcache.use_chflags sysctl (which enables data caching globally)
or do something like 'chflags cache /'. Of course vm.swapcache.read_enable
must also be turned on for swapcache to cache file data.
* NOTE! World must be rebuilt for libc, chflags, and ls to understand the
new flags.