Windows: Remove unused async read/write operations
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 24 May 2012 21:47:25 +0000 (17:47 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 31 May 2012 23:35:20 +0000 (16:35 -0700)
Removing dead code.

Change-Id: I60f3f098a3afb922143941f59b0146eebf60ac84
Reviewed-on: http://gerrit.openafs.org/7476
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp
src/WINNT/afsrdr/kernel/lib/Include/AFSCommon.h
src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h

index b33658d..2af9c67 100644 (file)
@@ -749,29 +749,6 @@ AFSWorkerThread( IN PVOID Context)
                         break;
                     }
 
-                    case AFS_WORK_ASYNCH_READ:
-                    {
-
-                        ASSERT( pWorkItem->Specific.AsynchIo.CallingProcess != NULL);
-
-                        (VOID) AFSCommonRead( pWorkItem->Specific.AsynchIo.Device,
-                                              pWorkItem->Specific.AsynchIo.Irp,
-                                              pWorkItem->Specific.AsynchIo.CallingProcess);
-
-                        break;
-                    }
-
-                    case AFS_WORK_ASYNCH_WRITE:
-                    {
-
-                        ASSERT( pWorkItem->Specific.AsynchIo.CallingProcess != NULL);
-
-                        (VOID) AFSCommonWrite( pWorkItem->Specific.AsynchIo.Device,
-                                               pWorkItem->Specific.AsynchIo.Irp,
-                                               pWorkItem->Specific.AsynchIo.CallingProcess);
-                        break;
-                    }
-
                     case AFS_WORK_ENUMERATE_GLOBAL_ROOT:
                     {
 
@@ -2255,178 +2232,6 @@ try_exit:
 }
 
 NTSTATUS
-AFSQueueAsyncRead( IN PDEVICE_OBJECT DeviceObject,
-                   IN PIRP Irp,
-                   IN HANDLE CallerProcess)
-{
-
-    NTSTATUS ntStatus = STATUS_SUCCESS;
-    AFSWorkItem *pWorkItem = NULL;
-
-    __try
-    {
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncRead Queuing request for Irp %08lX\n",
-                      Irp);
-
-        pWorkItem = (AFSWorkItem *) AFSLibExAllocatePoolWithTag( NonPagedPool,
-                                                                 sizeof(AFSWorkItem),
-                                                                 AFS_WORK_ITEM_TAG);
-        if (NULL == pWorkItem)
-        {
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_IO_PROCESSING,
-                          AFS_TRACE_LEVEL_ERROR,
-                          "AFSQueueAsyncRead Failed to allocate work item\n");
-
-            try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES );
-        }
-
-        RtlZeroMemory( pWorkItem,
-                       sizeof(AFSWorkItem));
-
-        pWorkItem->Size = sizeof( AFSWorkItem);
-
-        pWorkItem->RequestType = AFS_WORK_ASYNCH_READ;
-
-        pWorkItem->Specific.AsynchIo.Device = DeviceObject;
-
-        pWorkItem->Specific.AsynchIo.Irp = Irp;
-
-        pWorkItem->Specific.AsynchIo.CallingProcess = CallerProcess;
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncRead Workitem %08lX for Irp %08lX\n",
-                      pWorkItem,
-                      Irp);
-
-        ntStatus = AFSQueueWorkerRequest( pWorkItem);
-
-try_exit:
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncRead Request for Irp %08lX complete Status %08lX\n",
-                      Irp,
-                      ntStatus);
-
-        if( !NT_SUCCESS( ntStatus))
-        {
-
-            if( pWorkItem != NULL)
-            {
-
-                ExFreePoolWithTag( pWorkItem, AFS_WORK_ITEM_TAG);
-            }
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
-                          AFS_TRACE_LEVEL_ERROR,
-                          "AFSQueueAsyncRead Failed to queue request Status %08lX\n", ntStatus);
-        }
-    }
-    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
-    {
-
-        AFSDbgLogMsg( 0,
-                      0,
-                      "EXCEPTION - AFSQueueAsyncRead\n");
-
-        AFSDumpTraceFilesFnc();
-    }
-
-    return ntStatus;
-}
-
-NTSTATUS
-AFSQueueAsyncWrite( IN PDEVICE_OBJECT DeviceObject,
-                    IN PIRP Irp,
-                    IN HANDLE CallerProcess)
-{
-
-    NTSTATUS ntStatus = STATUS_SUCCESS;
-    AFSWorkItem *pWorkItem = NULL;
-
-    __try
-    {
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncWrite Queuing request for Irp %08lX\n",
-                      Irp);
-
-        pWorkItem = (AFSWorkItem *) AFSLibExAllocatePoolWithTag( NonPagedPool,
-                                                                 sizeof(AFSWorkItem),
-                                                                 AFS_WORK_ITEM_TAG);
-        if (NULL == pWorkItem)
-        {
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_IO_PROCESSING,
-                          AFS_TRACE_LEVEL_ERROR,
-                          "AFSQueueAsyncWrite Failed to allocate work item\n");
-
-            try_return( ntStatus = STATUS_INSUFFICIENT_RESOURCES );
-        }
-
-        RtlZeroMemory( pWorkItem,
-                       sizeof(AFSWorkItem));
-
-        pWorkItem->Size = sizeof( AFSWorkItem);
-
-        pWorkItem->RequestType = AFS_WORK_ASYNCH_WRITE;
-
-        pWorkItem->Specific.AsynchIo.Device = DeviceObject;
-
-        pWorkItem->Specific.AsynchIo.Irp = Irp;
-
-        pWorkItem->Specific.AsynchIo.CallingProcess = CallerProcess;
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncWrite Workitem %08lX for Irp %08lX\n",
-                      pWorkItem,
-                      Irp);
-
-        ntStatus = AFSQueueWorkerRequest( pWorkItem);
-
-try_exit:
-
-        AFSDbgLogMsg( AFS_SUBSYSTEM_WORKER_PROCESSING,
-                      AFS_TRACE_LEVEL_VERBOSE,
-                      "AFSQueueAsyncWrite Request for Irp %08lX complete Status %08lX\n",
-                      Irp,
-                      ntStatus);
-
-        if( !NT_SUCCESS( ntStatus))
-        {
-
-            if( pWorkItem != NULL)
-            {
-
-                ExFreePoolWithTag( pWorkItem, AFS_WORK_ITEM_TAG);
-            }
-
-            AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
-                          AFS_TRACE_LEVEL_ERROR,
-                          "AFSQueueAsyncWrite Failed to queue request Status %08lX\n", ntStatus);
-        }
-    }
-    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
-    {
-
-        AFSDbgLogMsg( 0,
-                      0,
-                      "EXCEPTION - AFSQueueAsyncWrite\n");
-
-        AFSDumpTraceFilesFnc();
-    }
-
-    return ntStatus;
-}
-
-NTSTATUS
 AFSQueueGlobalRootEnumeration()
 {
 
index 5ba3bd0..5bba777 100644 (file)
@@ -1467,16 +1467,6 @@ AFSQueueFlushExtents( IN AFSFcb *Fcb,
                       IN GUID *AuthGroup);
 
 NTSTATUS
-AFSQueueAsyncRead( IN PDEVICE_OBJECT DeviceObject,
-                   IN PIRP Irp,
-                   IN HANDLE CallerProcess);
-
-NTSTATUS
-AFSQueueAsyncWrite( IN PDEVICE_OBJECT DeviceObject,
-                    IN PIRP Irp,
-                    IN HANDLE CallerProcess);
-
-NTSTATUS
 AFSQueueGlobalRootEnumeration( void);
 
 NTSTATUS
index f600fdb..ccecea9 100644 (file)
@@ -112,8 +112,8 @@ NTSTATUS
 
 #define AFS_WORK_UNUSED_1                       0x0001
 #define AFS_WORK_FLUSH_FCB                      0x0002
-#define AFS_WORK_ASYNCH_READ                    0x0003
-#define AFS_WORK_ASYNCH_WRITE                   0x0004
+#define AFS_WORK_UNUSED_3                       0x0003
+#define AFS_WORK_UNUSED_4                       0x0004
 #define AFS_WORK_UNUSED_5                       0x0005
 #define AFS_WORK_ENUMERATE_GLOBAL_ROOT          0x0006
 #define AFS_WORK_INVALIDATE_OBJECT              0x0007