*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> vinvalbuf (9)              
Title
Content
Arch
Section
 

VINVALBUF(9)

Contents


NAME    [Toc]    [Back]

     vinvalbuf - flush and invalidate all buffers associated with
a vnode

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/vnode.h>

     int
     vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
             struct proc *p, int slpflag, int slptimeo);

DESCRIPTION    [Toc]    [Back]

     The  vinvalbuf() function invalidates all of the buffers associated with
     the given vnode.  This includes buffers on  the  clean  list
and the dirty
     list.   If  the V_SAVE flag is specified then the buffers on
the dirty list
     are synced prior to being released.  If the V_SAVEMETA  flag
is set, indirect
 blocks will not be flushed.

     Its arguments are:

     vp             A  pointer to the vnode whose buffers will be
invalidated.

     flags         The supported flags are V_SAVE and V_SAVEMETA.
V_SAVE indicates
  that  dirty  buffers should be synced
with the disk.
                   V_SAVEMETA  indicates  that  indirect   blocks
should not be
                   flushed.

     cred            The   user  credentials  that  are  used  to
VOP_FSYNC(9) buffers
                   if V_SAVE is set.

     p             The process responsible for this call.

     slpflag       The slp flag that will be used in the priority
of any
                   sleeps in the function.

     slptimeo      The timeout for any sleeps in the function.

LOCKS    [Toc]    [Back]

     The  vnode is assumed to be locked prior to the call and remains locked
     upon return.

RETURN VALUES    [Toc]    [Back]

     A value of 0 is returned on success.

PSEUDOCODE    [Toc]    [Back]

           vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
           error = vinvalbuf(devvp, V_SAVE, cred, p, 0, 0);
           VOP_UNLOCK(devvp, 0, p);
           if (error)
                   return (error);

ERRORS    [Toc]    [Back]

     [ENOSPC]      The file system is full.  (With V_SAVE)

     [EDQUOT]      Disc quota exceeded.  (With V_SAVE)

     [EWOULDBLOCK]
                   Sleep operation timed out.  (See slptimeo)

     [ERESTART]    A signal needs to be delivered and the  system
call should
                   be restarted.  (With PCATCH set in slpflag)

     [EINTR]        The  system has been interrupted by a signal.
(With PCATCH
                   set in slpflag)

SEE ALSO    [Toc]    [Back]

      
      
     tsleep(9), vnode(9)

AUTHORS    [Toc]    [Back]

     This  man  page  was  originally  written  by   Chad   David
<[email protected]>
     for FreeBSD.

OpenBSD      3.6                           July      7,      2001
[ Back ]
 Similar pages
Name OS Title
sync Linux flush filesystem buffers
sync Tru64 Flush file system metadata and data from memory buffers to disk.
sync2 Tru64 Flush file system metadata and data from memory buffers to disk
vinvalbuf FreeBSD flushes and invalidates all buffers associated with a vnode
VOP_FSYNC FreeBSD flush file system buffers for a file
bdflush Linux start, flush, or tune buffer-dirty-flush daemon
mdbm_remove IRIX invalidate and remove mdbm files
DeregisterDispatchTable Tru64 Invalidate CSSM pointers to EMM (CDSA)
fflush NetBSD flush a stream
fpurge NetBSD flush a stream
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service