vinvalbuf man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

VINVALBUF(9)		 BSD Kernel Developer's Manual		  VINVALBUF(9)

NAME
     vinvalbuf — flushes and invalidates all buffers associated with a vnode

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

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

DESCRIPTION
     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 there is a VM Object associated
     with the vnode, it is removed.

     Its arguments are:

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

     flags     The only supported flag is V_SAVE and it indicates that dirty
	       buffers should be synced with the disk.

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

     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
     The vnode is assumed to be locked prior to the call and remains locked
     upon return.

     Giant must be held by prior to the call and remains locked upon return.

RETURN VALUES
     A 0 value is returned on success.

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

ERRORS
     [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
     brelse(9), bremfree(9), tsleep(9), VOP_FSYNC(9)

AUTHORS
     This manual page was written by Chad David ⟨davidc@acns.ab.ca⟩.

BSD			       October 20, 2008				   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net