Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. locks.c
  5. Abstract:
  6. This module implements the mini redirector call down routines pertaining to locks
  7. of file system objects.
  8. Author:
  9. Balan Sethu Raman [SethuR] 7-March-1995
  10. Revision History:
  11. --*/
  12. #include "precomp.h"
  13. #pragma hdrstop
  14. #pragma warning(error:4101) // Unreferenced local variable
  15. //
  16. // The local debug trace level
  17. //
  18. #define Dbg (DEBUG_TRACE_LOCKCTRL)
  19. NTSTATUS
  20. MRxProxyLocks(
  21. IN PRX_CONTEXT RxContext)
  22. /*++
  23. Routine Description:
  24. This routine handles network requests for filelocks
  25. Arguments:
  26. RxContext - the RDBSS context
  27. Return Value:
  28. RXSTATUS - The return status for the operation
  29. --*/
  30. {
  31. NTSTATUS Status = STATUS_SUCCESS;
  32. RxCaptureFcb;
  33. RxCaptureFobx;
  34. PMRX_SRV_OPEN SrvOpen = capFobx->pSrvOpen;
  35. PAGED_CODE();
  36. RxDbgTrace(+1, Dbg, ("MRxProxyLocks\n", 0 ));
  37. ASSERT( NodeType(capFobx->pSrvOpen) == RDBSS_NTC_SRVOPEN );
  38. Status = STATUS_NOT_IMPLEMENTED;
  39. RxDbgTrace(-1, Dbg, ("MRxProxyLocks exit with status=%08lx\n", Status ));
  40. return(Status);
  41. }
  42. #if 0
  43. NTSTATUS
  44. MRxProxyUnlockRoutine (
  45. IN PRX_CONTEXT RxContext,
  46. IN PFILE_LOCK_INFO LockInfo
  47. )
  48. /*++
  49. Routine Description:
  50. This routine is called from the RDBSS whenever the fsrtl lock package calls the rdbss unlock routine.
  51. CODE.IMPROVEMENT what should really happen is that this should only be called for unlockall and unlockbykey;
  52. the other cases should be handled in the rdbss.
  53. Arguments:
  54. Context - the RxContext associated with this request
  55. LockInfo - gives information about the particular range being unlocked
  56. Return Value:
  57. RXSTATUS - The return status for the operation
  58. --*/
  59. {
  60. PLOWIO_CONTEXT LowIoContext = &RxContext->LowIoContext;
  61. switch (LowIoContext->Operation) {
  62. case LOWIO_OP_SHAREDLOCK:
  63. case LOWIO_OP_EXCLUSIVELOCK:
  64. case LOWIO_OP_UNLOCK:
  65. return STATUS_SUCCESS;
  66. case LOWIO_OP_UNLOCKALL:
  67. case LOWIO_OP_UNLOCKALLBYKEY:
  68. default:
  69. return STATUS_NOT_IMPLEMENTED;
  70. }
  71. }
  72. #endif
  73. NTSTATUS
  74. MRxProxyCompleteBufferingStateChangeRequest(
  75. IN OUT PRX_CONTEXT RxContext,
  76. IN OUT PMRX_SRV_OPEN SrvOpen,
  77. IN PVOID pContext
  78. )
  79. /*++
  80. Routine Description:
  81. This routine is called to assert the locks that the wrapper has buffered. currently, it is synchronous!
  82. Arguments:
  83. RxContext - the open instance
  84. SrvOpen - tells which fcb is to be used. CODE.IMPROVEMENT this param is redundant if the rxcontext is filled out completely
  85. Return Value:
  86. RXSTATUS - The return status for the operation
  87. --*/
  88. {
  89. NTSTATUS Status;
  90. PMRX_FCB Fcb = SrvOpen->pFcb;
  91. PMRX_PROXY_SRV_OPEN proxySrvOpen = MRxProxyGetSrvOpenExtension(SrvOpen);
  92. PAGED_CODE();
  93. RxDbgTrace(+1, Dbg, ("MRxProxyCompleteBufferingStateChangeRequest\n", 0 ));
  94. ASSERT( NodeType(SrvOpen) == RDBSS_NTC_SRVOPEN );
  95. RxDbgTrace(0,Dbg,("-->Context %lx\n",pContext));
  96. Status = STATUS_SUCCESS;
  97. RxDbgTrace(-1, Dbg, ("MRxProxyAssertBufferedFileLocks exit with status=%08lx\n", Status ));
  98. return(Status);
  99. }
  100. NTSTATUS
  101. MRxProxyIsLockRealizable (
  102. IN OUT PMRX_FCB pFcb,
  103. IN PLARGE_INTEGER ByteOffset,
  104. IN PLARGE_INTEGER Length,
  105. IN ULONG LowIoLockFlags
  106. )
  107. {
  108. PAGED_CODE();
  109. return(STATUS_SUCCESS);
  110. }
  111.