1 /* $NetBSD: rf_kintf.h,v 1.20 2006/08/27 05:07:12 christos Exp $ */
5 * RAIDframe exported kernel interface
8 * Copyright (c) 1995 Carnegie-Mellon University.
13 * Permission to use, copy, modify and distribute this software and
14 * its documentation is hereby granted, provided that both the copyright
15 * notice and this permission notice appear in all copies of the
16 * software, derivative works or modified versions, and any portions
17 * thereof, and that both notices appear in supporting documentation.
19 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
20 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
21 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
23 * Carnegie Mellon requests users of this software to return to
25 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
26 * School of Computer Science
27 * Carnegie Mellon University
28 * Pittsburgh PA 15213-3890
30 * any improvements or extensions that they make and grant Carnegie the
31 * rights to redistribute these changes.
34 #ifndef _RF__RF_KINTF_H_
35 #define _RF__RF_KINTF_H_
37 #include <dev/raidframe/raidframevar.h>
39 int rf_GetSpareTableFromDaemon(RF_SparetWait_t
* req
);
41 void raidstart(RF_Raid_t
* raidPtr
);
42 int rf_DispatchKernelIO(RF_DiskQueue_t
* queue
, RF_DiskQueueData_t
* req
);
44 int raidfetch_component_label(RF_Raid_t
*, RF_RowCol_t
);
45 RF_ComponentLabel_t
*raidget_component_label(RF_Raid_t
*, RF_RowCol_t
);
46 int raidflush_component_label(RF_Raid_t
*, RF_RowCol_t
);
48 void rf_paritymap_kern_write(RF_Raid_t
*, struct rf_paritymap_ondisk
*);
49 void rf_paritymap_kern_read(RF_Raid_t
*, struct rf_paritymap_ondisk
*);
51 #define RF_NORMAL_COMPONENT_UPDATE 0
52 #define RF_FINAL_COMPONENT_UPDATE 1
53 void rf_update_component_labels(RF_Raid_t
*, int);
54 int raidmarkclean(RF_Raid_t
*, RF_RowCol_t
);
55 int raidmarkdirty(RF_Raid_t
*, RF_RowCol_t
);
56 void raid_init_component_label(RF_Raid_t
*, RF_ComponentLabel_t
*);
57 void rf_print_component_label(RF_ComponentLabel_t
*);
58 void rf_UnconfigureVnodes( RF_Raid_t
* );
59 void rf_close_component( RF_Raid_t
*, struct vnode
*, int);
60 void rf_disk_unbusy(RF_RaidAccessDesc_t
*);
61 int rf_getdisksize(struct vnode
*, struct lwp
*, RF_RaidDisk_t
*);
62 int rf_sync_component_caches(RF_Raid_t
*raidPtr
);
63 #endif /* _RF__RF_KINTF_H_ */