Revert "modify FindIndex to compare uuids"
[openafs.git] / doc / arch / dafs-vnode-fsa.dot
1 #
2 # This is a dot (http://www.graphviz.org) description of the various
3 # states volumes can be in for DAFS (Demand Attach File Server).
4 #
5 # Author: Tom Keiser
6 # Date: 2008-06-03
7 #
8
9 digraph VolumeStates {
10         size="11,17"
11         graph [
12                 rankdir = "TB"
13         ];
14
15         subgraph clusterKey {
16                 rankdir="LR";
17                 shape = "rectangle";
18
19         s1 [ shape=plaintext, label = "VAllocVnode",
20                         fontcolor="brown" ];
21         s2 [ shape=plaintext, label = "VGetVnode",
22                         fontcolor="blue" ];
23         s3 [ shape=plaintext, label = "VPutVnode",
24                         fontcolor="purple" ];
25         s4 [ shape=plaintext, label = "Error States",
26                         fontcolor="red" ];
27         s5 [ shape=plaintext, label = "VVnodeWriteToRead",
28                         fontcolor="green" ];
29         s6 [ shape=ellipse, label = "re-entrant" ];
30         s7 [ shape=ellipse, peripheries=2, label="non re-entrant" ];
31         s8 [ shape=ellipse, color="red", label="Error States" ];
32
33         s6->s7->s8->s1->s2->s3->s5->s4 [style="invis"];
34
35         }
36
37         node [ peripheries = "2" ] \
38                 RELEASING ALLOC LOADING EXCLUSIVE STORE ;
39         node [ shape = "ellipse", peripheries = "1" ];
40         node [ color = "red" ] ERROR ;
41
42         node [ color = "black" ]; // default back to black
43
44
45         // node descriptions
46         INVALID [ label = "Vn_state(vnp) == VN_STATE_INVALID\n(vnode cache entry is invalid)" ];
47         RELEASING [ label = "Vn_state(vnp) == VN_STATE_RELEASING\n(vnode is busy releasing its inode handle ref)" ];
48         ALLOC [ label = "Vn_state(vnp) == VN_STATE_ALLOC\n(vnode is busy allocating disk entry)" ];
49         ALLOC_read [ label = "reading stale vnode from disk\nto verify inactive state" ];
50         ALLOC_extend [ label = "extending vnode index file" ];
51         ONLINE [ label = "Vn_state(vnp) == VN_STATE_ONLINE\n(vnode is a valid cache entry)" ];
52         LOADING [ label = "Vn_state(vnp) == VN_STATE_LOAD\n(vnode is busy loading from disk)" ];
53         EXCLUSIVE [ label = "Vn_state(vnp) == VN_STATE_EXCLUSIVE\n(vnode is owned exclusively by an external caller)" ];
54         STORE [ label = "Vn_state(vnp) == VN_STATE_STORE\n(vnode is busy writing to disk)" ];
55         READ [ label = "Vn_state(vnp) == VN_STATE_READ\n(vnode is shared by several external callers)" ];
56         ERROR [ label = "Vn_state(vnp) == VN_STATE_ERROR\n(vnode hard error state)" ];
57
58
59         ONLINE->RELEASING [ label = "VGetFreeVnode_r()" ];
60         RELEASING->INVALID [ label = "VGetFreeVnode_r()" ];
61
62         INVALID->ALLOC [ color="brown", label="vnode not in cache; allocating" ];
63         ONLINE->EXCLUSIVE [ color="brown", label="vnode in cache" ];
64         ALLOC->ALLOC_read [ color="brown", label="vnode index is within present file size" ];
65         ALLOC->ALLOC_extend [ color="brown", label="vnode index is beyond end of file" ];
66         ALLOC_read->EXCLUSIVE [ color="brown" ];
67         ALLOC_extend->EXCLUSIVE [ color="brown" ];
68         ALLOC_read->INVALID [ color="red", label="I/O error; invalidating vnode\nand scheduling salvage" ];
69         ALLOC_extend->INVALID [ color="red", label="I/O error; invalidating vnode\nand scheduling salvage" ];
70
71         INVALID->LOADING [ color="blue", label="vnode not cached" ];
72         LOADING->INVALID [ color="red", label="I/O error; invalidating vnode\nand scheduling salvage" ];
73         LOADING->ONLINE [ color="blue" ];
74         ONLINE->READ [ color="blue", label="caller requested read lock" ];
75         ONLINE->EXCLUSIVE [ color="blue", label="caller requested write lock" ];
76
77         EXCLUSIVE->READ [ color="green", label="vnode not changed" ];
78         EXCLUSIVE->STORE [ color="green", label="vnode changed" ];
79         EXCLUSIVE->ONLINE [ color="purple", label="vnode not changed" ];
80         EXCLUSIVE->STORE [ color="purple", label="vnode changed" ];
81
82         STORE->READ [ color="green" ];
83         STORE->ONLINE [ color="purple" ];
84         STORE->ERROR [ color="red", label="I/O error; scheduling salvage" ];
85
86         READ->READ [ color="blue", label="Vn_readers(vnp) > 0" ];
87         READ->READ [ color="purple", label="Vn_readers(vnp) > 1" ];
88         READ->ONLINE [ color="purple", label="Vn_readers(vnp) == 1" ];
89 }