diff options
| author | elric <elric@NetBSD.org> | 2004-03-27 23:23:06 +0000 |
|---|---|---|
| committer | elric <elric@NetBSD.org> | 2004-03-27 23:23:06 +0000 |
| commit | befeae8929bf08ac1db59de2e6dd256e84756e8a (patch) | |
| tree | e034671e4198431a307701a1c46dc22ea568d541 /sys/dev/cgdvar.h | |
| parent | b6e59003c46b3c7ad9577fe09bf46b5e0fa5f573 (diff) | |
Modified the dksubr routines to:
o expect the disk's start routine to return an int. If the
int is non-zero, we enqueue the request and try again
later.
o have a dk_start() routine which runs the request queue.
o have a dk_iodone() function which should be called by the
driver using the framwork from its iodone. dk_iodone will
retry the queue since presumably further progress may be
possible once a request is complete. It is required that
the underlying driver have the resources to keep at least
one transaction in flight at any time.
Modified cgd to:
o be able to keep one transaction in flight at any time
(almost) by keeping a buffer of size MAXPHYS in its softc
and use it.
We still need to make the cgd_cbufpool per device rather than global
and provide a low water mark for it.
Addresses PR: kern/24715
(at least according to the submitter.)
Diffstat (limited to 'sys/dev/cgdvar.h')
| -rw-r--r-- | sys/dev/cgdvar.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/cgdvar.h b/sys/dev/cgdvar.h index 40daead84db..ef83fa085a6 100644 --- a/sys/dev/cgdvar.h +++ b/sys/dev/cgdvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cgdvar.h,v 1.1 2002/10/04 18:22:35 elric Exp $ */ +/* $NetBSD: cgdvar.h,v 1.2 2004/03/27 23:23:06 elric Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -71,9 +71,12 @@ struct cgd_softc { struct vnode *sc_tvn; /* target device's vnode */ dev_t sc_tdev; /* target device */ char *sc_tpath; /* target device's path */ + caddr_t sc_data; /* emergency buffer */ + int sc_data_used; /* Really lame, we'll change */ size_t sc_tpathlen; /* length of prior string */ struct cryptdata sc_cdata; /* crypto data */ struct cryptfuncs *sc_cfuncs; /* encryption functions */ + struct simplelock sc_slock; /* our lock */ }; #endif |
