2 /* $NetBSD: rf_kintf.h,v 1.15 2000/10/20 02:24:45 oster Exp $ */
6 * RAIDframe exported kernel interface
9 * Copyright (c) 1995 Carnegie-Mellon University.
10 * All rights reserved.
14 * Permission to use, copy, modify and distribute this software and
15 * its documentation is hereby granted, provided that both the copyright
16 * notice and this permission notice appear in all copies of the
17 * software, derivative works or modified versions, and any portions
18 * thereof, and that both notices appear in supporting documentation.
20 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
21 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
22 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
24 * Carnegie Mellon requests users of this software to return to
26 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
27 * School of Computer Science
28 * Carnegie Mellon University
29 * Pittsburgh PA 15213-3890
31 * any improvements or extensions that they make and grant Carnegie the
32 * rights to redistribute these changes.
35 #ifndef _RF__RF_KINTF_H_
36 #define _RF__RF_KINTF_H_
38 #include <dev/raidframe/rf_types.h>
40 #if defined(__NetBSD__)
41 #define RF_LTSLEEP(cond, pri, text, time, mutex) \
42 ltsleep(cond, pri, text, time, mutex)
43 #elif defined(__FreeBSD__)
44 #if __FreeBSD_version > 500005
45 #define RF_LTSLEEP(cond, pri, text, time, mutex) \
46 msleep(cond, mutex, pri, text, time);
49 RF_LTSLEEP(void *cond, int pri, const char *text, int time, struct simplelock *mutex)
54 ret = tsleep(cond, pri, text, time);
62 int rf_GetSpareTableFromDaemon(RF_SparetWait_t * req);
64 void raidstart(RF_Raid_t * raidPtr);
65 int rf_DispatchKernelIO(RF_DiskQueue_t * queue, RF_DiskQueueData_t * req);
67 int raidwrite_component_label(dev_t, struct vnode *, RF_ComponentLabel_t *);
68 int raidread_component_label(dev_t, struct vnode *, RF_ComponentLabel_t *);
70 #define RF_NORMAL_COMPONENT_UPDATE 0
71 #define RF_FINAL_COMPONENT_UPDATE 1
72 void rf_update_component_labels(RF_Raid_t *, int);
73 int raidlookup(char *, RF_Thread_t, struct vnode **);
74 int raidmarkclean(dev_t dev, struct vnode *b_vp, int);
75 int raidmarkdirty(dev_t dev, struct vnode *b_vp, int);
76 void raid_init_component_label(RF_Raid_t *, RF_ComponentLabel_t *);
77 void rf_print_component_label(RF_ComponentLabel_t *);
78 void rf_UnconfigureVnodes( RF_Raid_t * );
79 void rf_close_component( RF_Raid_t *, struct vnode *, int);
80 void rf_disk_unbusy(RF_RaidAccessDesc_t *);
81 int raid_getcomponentsize(RF_Raid_t *, RF_RowCol_t, RF_RowCol_t);
82 #endif /* _RF__RF_KINTF_H_ */