Contents

vnode_iterate

Perform an operation on (almost) all vnodes from a given mountpoint.

Declaration

int vnode_iterate(struct mount *mp, int flags, int (*callout)(struct vnode *, void *), void *arg);

Parameters

  • mp:

    Mount whose vnodes to operate on.

  • flags:

    VNODE_RELOAD Mark inactive vnodes for recycle. VNODE_WAIT VNODE_WRITEABLE Only examine vnodes with writes in progress. VNODE_WITHID No effect. VNODE_NOLOCK_INTERNAL No effect. VNODE_NODEAD No effect. VNODE_NOSUSPEND No effect. VNODE_ITERATE_ALL No effect. VNODE_ITERATE_ACTIVE No effect. VNODE_ITERATE_INACTIVE No effect.

  • callout:

    Function to call on each vnode.

  • arg:

    Argument which will be passed to callout along with each vnode.

Return Value

Zero for success, else an error code. Will return 0 immediately if there are no vnodes hooked into the mount.

Discussion

Skips vnodes which are dead, in the process of reclaim, suspended, or of type VNON.

See Also

vnode