Contents

buf_invalidateblks

Invalidate all the blocks associated with a vnode.

Declaration

int buf_invalidateblks(vnode_t vp, int flags, int slpflag, int slptimeo);

Parameters

  • bp:

    The buffer whose data to invalidate.

  • flags:

    BUF_WRITE_DATA: write dirty data to disk with VNOP_BWRITE() before kicking buffer cache entries out. BUF_SKIP_META: do not invalidate metadata blocks.

  • slpflag:

    Flags to pass to "msleep" while waiting to acquire busy buffers.

  • slptimeo:

    Timeout in "hz" (1/100 second) to wait for a buffer to become unbusy before waking from sleep and re-starting the scan.

Return Value

0 for success, error values from msleep().

Discussion

This function does for all blocks associated with a vnode what buf_invalblkno does for one block. Again, it will only be able to invalidate data which were populated with traditional buffer cache routines, i.e. by buf_getblk() and callers thereof. Unlike buf_invalblkno(), it can be made to write dirty data to disk rather than casting it aside.

See Also

Buffers