Document FSSYNC commands
[openafs.git] / src / vol / fssync.h
index 2596cbe..50a3c37 100644 (file)
@@ -25,6 +25,9 @@
 
 /**
  * FSYNC command codes.
+ *
+ * If you add more command codes here, be sure to add some documentation
+ * in doc/arch/fssync.txt.
  */
 enum FSYNCOpCode {
     FSYNC_VOL_ON              = SYNC_COM_CODE_DECL(0), /**< bring Volume online */
@@ -97,6 +100,18 @@ typedef struct FSSYNC_VolOp_command {
     struct offlineInfo * volumes;
 } FSSYNC_VolOp_command;
 
+
+/**
+ * volume operation processing state.
+ */
+enum FSSYNC_VolOpState {
+    FSSYNC_VolOpPending        = 0, /**< volume operation request received */
+    FSSYNC_VolOpDenied         = 1, /**< volume operation request denied */
+    FSSYNC_VolOpRunningOnline  = 2, /**< volume operation is running while volume is online */
+    FSSYNC_VolOpRunningOffline = 3, /**< volume operation is running while volume is offline */
+    FSSYNC_VolOpRunningUnknown = 4 /**< volume operation is running; VVolOpLeaveOnline_r resolution unknown */
+};
+
 /**
  * volume operation information node.
  *
@@ -110,6 +125,7 @@ typedef struct FSSYNC_VolOp_command {
 typedef struct FSSYNC_VolOp_info {
     SYNC_command_hdr com;
     FSSYNC_VolOp_hdr vop;
+    enum FSSYNC_VolOpState vol_op_state; 
 } FSSYNC_VolOp_info;
 
 
@@ -174,4 +190,6 @@ extern afs_int32 FSYNC_VolOp(VolumeId volume, char *partName, int com, int reaso
 extern afs_int32 FSYNC_StatsOp(FSSYNC_StatsOp_hdr * scom, int command, int reason,
                               SYNC_response * res_in);
 
+extern void FSYNC_fsInit(void);
+
 #endif /* __fssync_h_ */