mention the openafs-robotest project
[openafs-wiki.git] / CodeArchitectureVInitVolumePackage.mdwn
1 -- Steven Jenkins - 11 Jun 2007 [[VInitVolumePackage]] is the main setup program for the fileserver, salvageserver, and volserver (and some utilities). It initializes the data structures need by each to do their operations. Synchronization is done via `vol_glock_mutex`, `vol_trans_mutex`, `vol_put_volume_cond`, and `vol_sleep_cond`.
2
3 - Called by:
4
5 1. fileserver
6 2. salvageserver
7 3. volserver
8 4. vol-dump utility
9 5. salvager
10 6. vol-bless utility (unsupported)
11
12 - Does: (among other operations)
13
14 1. [[VInitPartitionPackage]]
15 2. [[VInitVolumeHash]]
16 3. [[VInitVnodes]] (for small & large vnodes)
17 4. [[VAttachVolumesByPartition]]
18
19 [[VInitPartitionPackage]] simply allocates memory for use by the caller (for DAFs -- for non-DAFS, it's a no-op)
20
21 [[VInitVolumeHash]] allocates memory and sets up [[VolumeHashTable]].Table; also does queue\_Init for reach entry in the Table.
22
23 [[VInitVnodes]] allocates memory for the Vnode hash, and initializes all values in the entries (to 0 or NULL), or the nextpointer.
24
25 [[VInitVolumesByPartition]] reads the disk and calls [[VAttachVolumeByName]] ([[VPreAttachVolumeByName]] for DAFS) for each volume on the disk.