physio man page on SmartOS

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

PHYSIO(9F)							    PHYSIO(9F)

NAME
       physio, minphys - perform physical I/O

SYNOPSIS
       #include <sys/types.h>
       #include <sys/buf.h>
       #include <sys/uio.h>

       int physio(int(*strat)(struct buf *), struct buf *bp, dev_t dev,
	    int rw, void (*mincnt)(struct buf *), struct uio *uio);

       void minphys(struct buf *bp);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
   physio()
       strat
		  Pointer to device strategy routine.

       bp
		  Pointer  to  a buf(9S) structure describing the transfer. If
		  bp is set to NULL then physio() allocates one which is auto‐
		  matically released upon completion.

       dev
		  The device number.

       rw
		  Read/write flag. This is either B_READ when reading from the
		  device, or B_WRITE when writing to the device.

       mincnt
		  Routine which bounds the maximum transfer unit size.

       uio
		  Pointer to the uio structure which describes	the  user  I/O
		  request.

   minphys()
       bp
	      Pointer to a buf structure.

DESCRIPTION
       physio()	 performs unbuffered I/O operations between the device dev and
       the address space described in the uio structure.

       Prior to the start of the  transfer  physio()  verifies	the  requested
       operation  is  valid  by	 checking  the protection of the address space
       specified in the uio structure. It then locks the pages involved in the
       I/O transfer so they can not be paged out. The device strategy routine,
       strat(), is then called one or more times to perform the	 physical  I/O
       operations.  physio()  uses biowait(9F) to block until strat() has com‐
       pleted each transfer.  Upon  completion,	 or  detection	of  an	error,
       physio() unlocks the pages and returns the error status.

       physio()	 uses  mincnt() to bound the maximum transfer unit size to the
       system, or device, maximum length. minphys()  is	 the  system  mincnt()
       routine	for use with physio() operations. Drivers which do not provide
       their own local mincnt() routines should call physio() with minphys().

       minphys() limits the value of bp->b_bcount to a	sensible  default  for
       the capabilities of the system. Drivers that provide their own mincnt()
       routine should also call minphys() to make sure they do not exceed  the
       system limit.

RETURN VALUES
       physio() returns:

       0
		   Upon success.

       non-zero
		   Upon failure.

CONTEXT
       physio() can be called from user context only.

SEE ALSO
       strategy(9E), biodone(9F), biowait(9F), buf(9S), uio(9S)

       Writing Device Drivers

WARNINGS
       Since physio() calls biowait() to block until each buf transfer is com‐
       plete, it is the drivers responsibility to call	biodone(9F)  when  the
       transfer is complete, or physio() will block forever.

				  Apr 2, 1993			    PHYSIO(9F)
[top]

List of man pages available for SmartOS

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