[Libsysio-commit] HEAD: libsysio/include inode.h
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2003-10-17 21:30:33
|
Update of /cvsroot/libsysio/libsysio/include
In directory sc8-pr-cvs1:/tmp/cvs-serv10931/include
Modified Files:
inode.h
Log Message:
Added a done bit to the IO context record to *positively* signal completion.
Also, added a driver private pointer to the dsame record for handy use.
Index: inode.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -b -B -p -r1.12 -r1.13
--- inode.h 15 Oct 2003 18:00:56 -0000 1.12
+++ inode.h 17 Oct 2003 21:30:29 -0000 1.13
@@ -356,7 +356,8 @@ struct ioctx_callback {
struct ioctx {
LIST_ENTRY(ioctx) ioctx_link; /* AIO list link */
unsigned
- ioctx_fast : 1; /* from stack space */
+ ioctx_fast : 1, /* from stack space */
+ ioctx_done : 1; /* transfer complete */
ioid_t ioctx_id; /* unique ident */
struct inode *ioctx_ino; /* i-node */
const struct iovec *ioctx_iovec; /* scatter/gather vec */
@@ -364,7 +365,8 @@ struct ioctx {
_SYSIO_OFF_T ioctx_offset; /* file offset */
ssize_t ioctx_cc; /* rtn char count */
int ioctx_errno; /* error number */
- TAILQ_HEAD(, ioctx_callback) ioctx_cbq; /* error number */
+ TAILQ_HEAD(, ioctx_callback) ioctx_cbq; /* callback queue */
+ void *ioctx_private; /* driver data */
};
/*
@@ -373,6 +375,7 @@ struct ioctx {
#define IOCTX_INIT(ioctx, fast, id, ino, iov, iovlen, off) \
do { \
(ioctx)->ioctx_fast = (fast); \
+ (ioctx)->ioctx_done = 0; \
(ioctx)->ioctx_id = (id); \
(ioctx)->ioctx_ino = (ino); \
(ioctx)->ioctx_iovec = (iov); \
@@ -381,7 +384,9 @@ struct ioctx {
(ioctx)->ioctx_cc = 0; \
(ioctx)->ioctx_errno = 0; \
TAILQ_INIT(&(ioctx)->ioctx_cbq); \
+ (ioctx)->ioctx_private = NULL; \
} while (0)
+
/*
* Return whether a pnode/inode is on a read-only mount or file system.
*/
|