Add NEWS entry for recent ubik changes
[openafs.git] / doc / txt / dafs-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: Steven Jenkins
6 # Date: 2007-05-24
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 = "VPut after VDetach in brown",
20                         fontcolor="brown" ];
21         s2 [ shape=plaintext, label = "VAttach in blue",
22                         fontcolor="blue" ];
23         s3 [ shape=plaintext, label = "VGet/VHold in purple",
24                         fontcolor="purple" ];
25         s4 [ shape=plaintext, label = "Error States in red",
26                         fontcolor="red" ];
27         s5 [ shape=plaintext, label = "VPut after VOffline in green",
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->s4->s5 [style="invis"];
34
35         }
36
37         node [ peripheries = "2" ] ATTACHING \
38                 LOADING_VNODE_BITMAPS HDR_LOADING_FROM_DISK \
39                 HDR_ATTACHING_LRU_PULL \
40                 "UPDATING\nSYNCING_VOL_HDR_TO_DISK" \
41                 OFFLINING DETACHING;
42         node [ shape = "ellipse", peripheries = "1" ];
43         node [ color = "red" ] HARD_ERROR SALVAGE_REQUESTED SALVAGING;
44
45         node [ color = "black" ]; // default back to black
46
47         UNATTACHED->Exclusive_vol_op_executing [label = "controlled by FSSYNC" ];
48         Exclusive_vol_op_executing->UNATTACHED  [label = "controlled by FSSYNC" ];
49         UNATTACHED->FREED [ label = "VCancelReservation_r() after a\nVDetach() or FreeVolume() will\ncause CheckDetach() or CheckFree() to fire" ];
50         OFFLINING->UNATTACHED;
51         UNATTACHED->PREATTACHED [ color = "orange", label = "PreAttach()" ];
52         PREATTACHED->UNATTACHED [ color = "orange", label = "VOffline()"];
53         HARD_ERROR->PREATTACHED [ color = "orange", label = "operator intervention via FSSYNC" ];
54
55         PREATTACHED->Exclusive_vol_op_executing [color = "orange", label = "controlled by FSSYNC" ];
56         Exclusive_vol_op_executing->PREATTACHED [color = "orange", label = "controlled by FSSYNC" ];
57         PREATTACHED->FREED [ color = "orange", label = "VCancelReservation_r() after a\nVDetach() or FreeVolume() will\ncause CheckDetach() or CheckFree() to fire" ];
58         PREATTACHED->ATTACHING [ color = "blue", weight = "8" ];
59         SALVAGING->PREATTACHED [ label = "controlled via FSSYNC" ];     
60
61         DETACHING->FREED ;
62         SHUTTING_DOWN->DETACHING [ color = "brown" ];
63         ATTACHED_nUsers_GT_0->SHUTTING_DOWN [ color = "orange", label = "VDetach()" ];
64
65         DETACHING->"UPDATING\nSYNCING_VOL_HDR_TO_DISK" [ color = "brown" ];
66         "UPDATING\nSYNCING_VOL_HDR_TO_DISK"->DETACHING [ color = "brown" ];
67         OFFLINING->"UPDATING\nSYNCING_VOL_HDR_TO_DISK" [ color = "green" ];
68         "UPDATING\nSYNCING_VOL_HDR_TO_DISK"->OFFLINING [ color = "green" ];
69         GOING_OFFLINE->OFFLINING [ color = "green" ];
70
71         "UPDATING\nSYNCING_VOL_HDR_TO_DISK"->SALVAGE_REQUESTED [ color = "red" ];       
72         "UPDATING\nSYNCING_VOL_HDR_TO_DISK"->ATTACHING [ color = "blue" ];      
73         ATTACHING->"UPDATING\nSYNCING_VOL_HDR_TO_DISK" [ color = "blue" ];
74
75         ATTACHED_nUsers_GT_0->GOING_OFFLINE [ color = "orange", label = "VOffline" ];   
76         ATTACHED_nUsers_GT_0->ATTACHED_nUsers_EQ_0 [ color = "orange", label = "VPut" ];        
77
78         ATTACHED_nUsers_GT_0->SALVAGE_REQUESTED [ color = "red" ];
79
80         LOADING_VNODE_BITMAPS->ATTACHING [ color = "blue" ];
81         ATTACHING->LOADING_VNODE_BITMAPS [ color = "blue" ] ;
82         LOADING_VNODE_BITMAPS->SALVAGE_REQUESTED [ color = "red" ];
83         HDR_LOADING_FROM_DISK->SALVAGE_REQUESTED [ color = "red" ];
84         HDR_LOADING_FROM_DISK->ATTACHING [ color = "blue" ] ;
85         HDR_LOADING_FROM_DISK->ATTACHED_nUsers_GT_0 [ color = "purple" ];
86
87         SALVAGE_REQUESTED->SALVAGING [ label = "controlled via FSSYNC" ];
88         SALVAGE_REQUESTED->HARD_ERROR [ color = "red", 
89                 label = "After hard salvage limit reached,\n hard error state is in effect\nuntil there is operator intervention" ];
90         
91         HDR_ATTACHING_LRU_PULL->HDR_LOADING_FROM_DISK [ color = "blue" ];
92         HDR_ATTACHING_LRU_PULL->HDR_LOADING_FROM_DISK [ color = "purple" ];
93         HDR_ATTACHING_LRU_PULL->ATTACHED_nUsers_GT_0 [ color = "purple", label = "header can be in LRU\nand not have been reclaimed\nthus skipping disk I/O" ];
94
95         ATTACHING->HDR_ATTACHING_LRU_PULL [ color = "blue" ];
96         ATTACHING->ATTACHED_nUsers_EQ_0 [ color = "blue" ];
97
98         ATTACHING->SALVAGE_REQUESTED [ color = "red" ];
99         ATTACHED_nUsers_EQ_0->HDR_ATTACHING_LRU_PULL [ color = "purple" ];
100         
101         ATTACHED_nUsers_EQ_0->SALVAGE_REQUESTED [ color = "red" ];
102
103         // Various loopback transitions
104         GOING_OFFLINE->GOING_OFFLINE [ label = "VPut when (nUsers > 1)" ];
105         SHUTTING_DOWN->SHUTTING_DOWN 
106                 [ label = "VPut when ((nUsers > 1) ||\n((nUsers == 1) && (nWaiters > 0)))" ];
107         SHUTTING_DOWN->SHUTTING_DOWN
108                 [ label = "VCancelReservation_r when ((nWaiters > 1)\n|| ((nWaiters == 1) && (nUsers > 0)))"];  
109