/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_FDBUFFER_H
#define _SYS_FDBUFFER_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
} fdb_type_t;
typedef struct fdb_holes {
} fdb_holes_t;
struct fdbuffer;
/*
* Implementation notes in the fdbuffer structure members:
*
* fd_state: The state variable carries four distinct types of information
* it could probably be a bit field as such.
*
* This information is stored in fdbuffer at the time the
* The buffer is created and is used for sanity check in
* subsequent calls to fdb_iosetup(). This information
* persists for the entire life of the buffer.
*
* [A]SYNC:
* The buffer can be either in sync or async mode. In
* async mode all calls are to be async and the i/o
* must take place for the entire range or the fdbuf
* i/o must be ended with a call to fdb_ioerrdone()
* In the async case the call back is made either
* for every i/o completed or only once at the end
* of i/o. This depends on how the call back function
* is registered. See fdb_set_iofunc(). The fdbuf has
* to be freed by the call back function.
*
* ZEROHOLE:
* This is the case the holes are to be zeroed. Note
* that we do not zero the holes when fdb_add_hole() is
* getting called. We leave the zeroing of the holes to
* when a list is requested or the buffer is freed. This
* so that we can avoid zeroing pages while holding ufs
* locks.
*/
typedef struct fdbuffer {
union {
} fd_un;
/*
* Call this function when the I/O on the full range of fdbuffer
* is completed. The call is made only if the i/o requests
* are asynchronous.
*/
/*
* The mutex protects iodispatch, iocount, state, and resid
* flags and variables since they are examined and updated by
* async call backs. All other structure members are modified
* in a single threaded fashion and do not require a lock.
*/
} fdbuffer_t;
int flags);
/*
* Need to add:
* fdb_get_iolen
*/
extern void fdb_init(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FDBUFFER_H */