picl: remove sparc-only plugins
[unleashed.git] / docs / fs / fem.md
blob8210200f746ab7524c4551d535cfb485a9548fec
1 File Event Monitor
2 ==================
4 The file event monitor (fem) framework allows kernel modules to intercept
5 vnode operation invocation with per-vnode granularity.  The original fem
6 design was described in PSARC/2003/172.  While the functionality remains in
7 unleashed, the design has changed in a number of ways.
9 (The following description talks about vnode specific ops vectors and fem
10 handling, but similar rules apply at the vfs level.)
12 The original implementation relied on being able to change vnode's ops
13 vector, to direct execution to its vhead functions which would invoke the
14 first pushed fem op.  This caused various headaches related to
15 const-ification and simplification of vnode ops invocation.
17 The new design *never* changes the vnode ops vector.  Instead it relies on
18 the `fop_*` functions to call the corresponding vhead function directly (via
19 the `fop_*_dispatch` helpers).  Once the vhead function has control, it does
20 similar processing as before - either it calls the first fem operation, or
21 it invokes the original vnode op (again, via the `fop_*_dispatch` helpers).
23 Each fem operation may or may not call the vnext function.  The vnext
24 function is still responsible for invoking the next fem operation, or
25 calling the original vnode op (yet again, accomplished via the
26 `fop_*_dispatch` helpers).