Windows: Use AFS_OBJECT_REFERENCE_MAX in struct
[openafs.git] / src / WINNT / afsrdr / kernel / lib / Include / AFSStructs.h
index f350942..3e308ff 100644 (file)
@@ -73,14 +73,25 @@ typedef struct _AFS_WORKER_QUEUE_HDR
 // These are the context control blocks for the open instance
 //
 
+typedef struct _AFS_NONPAGED_CCB
+{
+
+    ERESOURCE           CcbLock;
+
+} AFSNonPagedCcb;
+
+
 typedef struct _AFS_CCB
 {
 
     USHORT        Size;
+
     USHORT        Type;
 
     ULONG         Flags;
 
+    AFSNonPagedCcb  *NPCcb;
+
     AFSListEntry  ListEntry;
 
     //
@@ -167,6 +178,8 @@ typedef struct _AFS_NONPAGED_OBJECT_INFO_CB
 
     ERESOURCE           DirectoryNodeHdrLock;
 
+    ERESOURCE           ObjectInfoLock;
+
 } AFSNonPagedObjectInfoCB;
 
 typedef struct _AFS_OBJECT_INFORMATION_CB
@@ -180,6 +193,8 @@ typedef struct _AFS_OBJECT_INFORMATION_CB
 
     LONG                      ObjectReferenceCount;
 
+    LONG                      ObjectReferences[ AFS_OBJECT_REFERENCE_MAX];
+
     AFSNonPagedObjectInfoCB  *NonPagedInfo;
 
     //
@@ -192,7 +207,7 @@ typedef struct _AFS_OBJECT_INFORMATION_CB
     // Parent object information
     //
 
-    struct _AFS_OBJECT_INFORMATION_CB   *ParentObjectInformation;
+    AFSFileID              ParentFileId;
 
     //
     // Pointer to the current Fcb, if available
@@ -258,36 +273,36 @@ typedef struct _AFS_OBJECT_INFORMATION_CB
 
                        struct _AFS_DIRECTORY_CB  *DirectoryNodeListTail;
 
-            LONG                       DirectoryNodeCount;
+                        LONG                       DirectoryNodeCount;
 
                        struct _AFS_DIRECTORY_CB  *ShortNameTree;
 
-            //
-            // PIOCtl directory cb entry
-            //
+                        //
+                        // PIOCtl directory cb entry
+                        //
 
-            struct _AFS_DIRECTORY_CB  *PIOCtlDirectoryCB;
+                        struct _AFS_DIRECTORY_CB  *PIOCtlDirectoryCB;
 
-            //
-            // Open handle and reference count for this object
-            //
+                        //
+                        // Open handle and reference count for this object
+                        //
 
-            LONG                       ChildOpenHandleCount;
+                        LONG                       ChildOpenHandleCount;
 
-            LONG                       ChildOpenReferenceCount;
+                        LONG                       ChildOpenReferenceCount;
 
-            //
-            // Index for the PIOCtl and share open count
-            //
+                        //
+                        // Index for the PIOCtl and share open count
+                        //
 
-            LONG                OpenRequestIndex;
+                        LONG                OpenRequestIndex;
 
                } Directory;
 
                struct
                {
 
-            ULONG       Reserved;
+                        ULONG       Reserved;
 
                } File;
 
@@ -308,7 +323,13 @@ typedef struct _AFS_NON_PAGED_VOLUME_CB
 
     ERESOURCE           DirectoryNodeHdrLock;
 
-}AFSNonPagedVolumeCB;
+    //
+    // Volume worker thread
+    //
+
+    AFSWorkQueueContext       VolumeWorkerContext;
+
+} AFSNonPagedVolumeCB;
 
 typedef struct _AFS_VOLUME_CB
 {
@@ -366,12 +387,6 @@ typedef struct _AFS_VOLUME_CB
     AFSFcb                   *RootFcb;
 
     //
-    // Volume worker thread
-    //
-
-    AFSWorkQueueContext       VolumeWorkerContext;
-
-    //
     // Volume information
     //
 
@@ -418,7 +433,13 @@ typedef struct _AFS_DIRECTORY_CB
     // for tear down
     //
 
-    LONG             OpenReferenceCount;
+    LONG             DirOpenReferenceCount;
+
+    //
+    // Current count of reference from Name Array entries
+    //
+
+    LONG             NameArrayReferenceCount;
 
     //
     // File index used in directory enumerations