]>
Commit | Line | Data |
---|---|---|
70deb804 SP |
1 | |
2 | /* | |
3 | * Structures pulled from dump/tape.c. We need it here so the 'archive' code can | |
4 | * determine where we are in the tape. | |
5 | */ | |
6 | #ifndef _SLAVE_H | |
7 | #define _SLAVE_H 1 | |
8 | ||
9 | /* | |
10 | * Concurrent dump mods (Caltech) - disk block reading and tape writing | |
11 | * are exported to several slave processes. While one slave writes the | |
12 | * tape, the others read disk blocks; they pass control of the tape in | |
13 | * a ring via signals. The parent process traverses the filesystem and | |
14 | * sends writeheader()'s and lists of daddr's to the slaves via pipes. | |
15 | * The following structure defines the instruction packets sent to slaves. | |
16 | */ | |
17 | struct req { | |
18 | ext2_loff_t dblk; | |
19 | int count; | |
20 | }; | |
21 | ||
22 | #define SLAVES 3 /* 1 slave writing, 1 reading, 1 for slack */ | |
23 | ||
24 | struct slave { | |
25 | int tapea; /* header number at start of this chunk */ | |
26 | int count; /* count to next header (used for TS_TAPE */ | |
27 | /* after EOT) */ | |
28 | int inode; /* inode that we are currently dealing with */ | |
29 | int fd; /* FD for this slave */ | |
30 | int pid; /* PID for this slave */ | |
31 | int sent; /* 1 == we've sent this slave requests */ | |
32 | int firstrec; /* record number of this block */ | |
33 | char (*tblock)[TP_BSIZE]; /* buffer for data blocks */ | |
34 | struct req *req; /* buffer for requests */ | |
35 | }; | |
36 | ||
37 | extern struct slave *slp; | |
38 | ||
39 | #endif |