Windows: SetVolumeState is not an invalidation
[openafs.git] / src / WINNT / afsrdr / kernel / lib / AFSGeneric.cpp
index f524fa1..e4fb8a5 100644 (file)
@@ -3276,96 +3276,6 @@ AFSSetVolumeState( IN AFSVolumeStatusCB *VolumeStatus)
 
                 InterlockedOr( (LONG *)&(pVolumeCB->Flags), AFS_VOLUME_FLAGS_OFFLINE);
             }
-
-            AFSAcquireShared( pVolumeCB->ObjectInfoTree.TreeLock,
-                              TRUE);
-
-            pCurrentObject = pVolumeCB->ObjectInfoListHead;;
-
-            while( pCurrentObject != NULL)
-            {
-
-                if( VolumeStatus->Online)
-                {
-
-                    ClearFlag( pCurrentObject->Flags, AFS_OBJECT_FLAGS_OBJECT_INVALID);
-
-                    SetFlag( pCurrentObject->Flags, AFS_OBJECT_FLAGS_VERIFY);
-
-                    pCurrentObject->DataVersion.QuadPart = (ULONGLONG)-1;
-                }
-                else
-                {
-
-                    SetFlag( pCurrentObject->Flags, AFS_OBJECT_FLAGS_OBJECT_INVALID);
-                }
-
-                pFcb = pCurrentObject->Fcb;
-
-                if( pFcb != NULL &&
-                    !(VolumeStatus->Online) &&
-                    pFcb->Header.NodeTypeCode == AFS_FILE_FCB)
-                {
-
-                    AFSDbgLogMsg( AFS_SUBSYSTEM_EXTENT_PROCESSING,
-                                  AFS_TRACE_LEVEL_ERROR,
-                                  "AFSSetVolumeState Marking volume offline and canceling extents Volume Cell %08lX Volume %08lX\n",
-                                  VolumeStatus->FileID.Cell,
-                                  VolumeStatus->FileID.Volume);
-
-                    //
-                    // Clear out the extents
-                    //
-
-                    AFSDbgLogMsg( AFS_SUBSYSTEM_LOCK_PROCESSING,
-                                  AFS_TRACE_LEVEL_VERBOSE,
-                                  "AFSSetVolumeState Acquiring Fcb extents lock %08lX EXCL %08lX\n",
-                                  &pFcb->NPFcb->Specific.File.ExtentsResource,
-                                  PsGetCurrentThread());
-
-                    AFSAcquireExcl( &pFcb->NPFcb->Specific.File.ExtentsResource,
-                                    TRUE);
-
-                    pFcb->NPFcb->Specific.File.ExtentsRequestStatus = STATUS_CANCELLED;
-
-                    KeSetEvent( &pFcb->NPFcb->Specific.File.ExtentsRequestComplete,
-                                0,
-                                FALSE);
-
-                    AFSDbgLogMsg( AFS_SUBSYSTEM_LOCK_PROCESSING,
-                                  AFS_TRACE_LEVEL_VERBOSE,
-                                  "AFSSetVolumeState Releasing Fcb extents lock %08lX EXCL %08lX\n",
-                                  &pFcb->NPFcb->Specific.File.ExtentsResource,
-                                  PsGetCurrentThread());
-
-                    AFSReleaseResource( &pFcb->NPFcb->Specific.File.ExtentsResource);
-
-                    //
-                    // And get rid of them (note this involves waiting
-                    // for any writes or reads to the cache to complete)
-                    //
-
-                    AFSTearDownFcbExtents( pFcb,
-                                           NULL);
-                }
-
-                pCurrentObject = (AFSObjectInfoCB *)pCurrentObject->ListEntry.fLink;
-            }
-
-            AFSReleaseResource( pVolumeCB->ObjectInfoTree.TreeLock);
-
-            lCount = InterlockedDecrement( &pVolumeCB->VolumeReferenceCount);
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_VOLUME_REF_COUNTING,
-                          AFS_TRACE_LEVEL_VERBOSE,
-                          "AFSSetVolumeState Decrement count on volume %08lX Cnt %d\n",
-                          pVolumeCB,
-                          lCount);
-        }
-        else
-        {
-
-            AFSReleaseResource( &pDevExt->Specific.RDR.VolumeTreeLock);
         }
     }