xref: /netbsd-src/sys/dev/raidframe/rf_dagflags.h (revision 5e4c038a45edbc7d63b7c2daa76e29f88b64a4e3)
1 /*	$NetBSD: rf_dagflags.h,v 1.3 1999/02/05 00:06:08 oster Exp $	*/
2 /*
3  * Copyright (c) 1995 Carnegie-Mellon University.
4  * All rights reserved.
5  *
6  * Author: Mark Holland
7  *
8  * Permission to use, copy, modify and distribute this software and
9  * its documentation is hereby granted, provided that both the copyright
10  * notice and this permission notice appear in all copies of the
11  * software, derivative works or modified versions, and any portions
12  * thereof, and that both notices appear in supporting documentation.
13  *
14  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
16  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17  *
18  * Carnegie Mellon requests users of this software to return to
19  *
20  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
21  *  School of Computer Science
22  *  Carnegie Mellon University
23  *  Pittsburgh PA 15213-3890
24  *
25  * any improvements or extensions that they make and grant Carnegie the
26  * rights to redistribute these changes.
27  */
28 
29 /**************************************************************************************
30  *
31  * dagflags.h -- flags that can be given to DoAccess
32  * I pulled these out of dag.h because routines that call DoAccess may need these flags,
33  * but certainly do not need the declarations related to the DAG data structures.
34  *
35  **************************************************************************************/
36 
37 
38 #ifndef _RF__RF_DAGFLAGS_H_
39 #define _RF__RF_DAGFLAGS_H_
40 
41 /*
42  * Bitmasks for the "flags" parameter (RF_RaidAccessFlags_t) used
43  * by DoAccess, SelectAlgorithm, and the DAG creation routines.
44  *
45  * If USE_DAG or USE_ASM is specified, neither the DAG nor the ASM
46  * will be modified, which means that you can't SUPRESS if you
47  * specify USE_DAG.
48  */
49 
50 #define RF_DAG_FLAGS_NONE             0	/* no flags */
51 #define RF_DAG_SUPPRESS_LOCKS     (1<<0)	/* supress all stripe locks in
52 						 * the DAG */
53 #define RF_DAG_RETURN_ASM         (1<<1)	/* create an ASM and return it
54 						 * instead of freeing it */
55 #define RF_DAG_RETURN_DAG         (1<<2)	/* create a DAG and return it
56 						 * instead of freeing it */
57 #define RF_DAG_NONBLOCKING_IO     (1<<3)	/* cause DoAccess to be
58 						 * non-blocking */
59 #define RF_DAG_ACCESS_COMPLETE    (1<<4)	/* the access is complete */
60 #define RF_DAG_DISPATCH_RETURNED  (1<<5)	/* used to handle the case
61 						 * where the dag invokes no
62 						 * I/O */
63 #define RF_DAG_TEST_ACCESS        (1<<6)	/* this access came through
64 						 * rf_ioctl instead of
65 						 * rf_strategy */
66 
67 #endif				/* !_RF__RF_DAGFLAGS_H_ */
68