xref: /netbsd/sys/dev/raidframe/rf_copyback.h (revision bf9ec67e)
1 /*	$NetBSD: rf_copyback.h,v 1.4 2001/10/04 15:58:51 oster Exp $	*/
2 /*
3  * rf_copyback.h
4  */
5 /*
6  * Copyright (c) 1996 Carnegie-Mellon University.
7  * All rights reserved.
8  *
9  * Author: Jim Zelenka
10  *
11  * Permission to use, copy, modify and distribute this software and
12  * its documentation is hereby granted, provided that both the copyright
13  * notice and this permission notice appear in all copies of the
14  * software, derivative works or modified versions, and any portions
15  * thereof, and that both notices appear in supporting documentation.
16  *
17  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
18  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
19  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20  *
21  * Carnegie Mellon requests users of this software to return to
22  *
23  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
24  *  School of Computer Science
25  *  Carnegie Mellon University
26  *  Pittsburgh PA 15213-3890
27  *
28  * any improvements or extensions that they make and grant Carnegie the
29  * rights to redistribute these changes.
30  */
31 
32 #ifndef _RF__RF_COPYBACK_H_
33 #define _RF__RF_COPYBACK_H_
34 
35 #include <dev/raidframe/raidframevar.h>
36 
37 typedef struct RF_CopybackDesc_s {
38 	RF_Raid_t *raidPtr;
39 	RF_RowCol_t frow;
40 	RF_RowCol_t fcol;
41 	RF_RowCol_t spRow;
42 	RF_RowCol_t spCol;
43 	int     status;
44 	RF_StripeNum_t stripeAddr;
45 	RF_SectorCount_t sectPerSU;
46 	RF_SectorCount_t sectPerStripe;
47 	char   *databuf;
48 	RF_DiskQueueData_t *readreq;
49 	RF_DiskQueueData_t *writereq;
50 	struct timeval starttime;
51 	RF_MCPair_t *mcpair;
52 }       RF_CopybackDesc_t;
53 
54 extern int rf_copyback_in_progress;
55 
56 int     rf_ConfigureCopyback(RF_ShutdownList_t ** listp);
57 void    rf_CopybackReconstructedData(RF_Raid_t * raidPtr);
58 void    rf_ContinueCopyback(RF_CopybackDesc_t * desc);
59 
60 #endif				/* !_RF__RF_COPYBACK_H_ */
61