22#define BugCheckFileId (CDFS_BUG_CHECK_VERFYSUP)
25#pragma alloc_text(PAGE, CdVerifyFcbOperation)
26#pragma alloc_text(PAGE, CdVerifyVcb)
80 return CdFsdPostRequest( IrpContext,
Irp );
157 CdCheckForDismount( IrpContext,
Vcb,
FALSE );
204 if (IrpContext !=
NULL) {
206 Status = CdFsdPostRequest( IrpContext,
Irp );
300 VcbPresent = CdDismountVcb( IrpContext,
Vcb );
309 }
else if (
Vcb->VcbReference == 0) {
319 if (
Vcb->Vpb->ReferenceCount == 1) {
388#pragma prefast(suppress: 28175, "this is a filesystem driver, touching the vpb is allowed")
390 if (
Vcb->Vpb->RealDevice->Vpb ==
Vcb->Vpb) {
439 ULONG MediaChangeCount = 0;
482 Vcb->TargetDeviceObject,
495 MediaChangeCount = 0;
514 (
Vcb->MediaChangeCount != MediaChangeCount))) {
523 !DevMarkedForVerify) {
574 Vcb->Vpb->RealDevice );
576 CdRaiseStatus( IrpContext, (ForceVerify || DevMarkedForVerify)
586 switch (
Vcb->VcbCondition) {
656 Irp = IrpContext->Irp;
815 Vcb->XADiskOffset = 0;
823 if (
Vcb->RootIndexFcb !=
NULL) {
825 Vcb->RootIndexFcb->FcbReference -= 1;
826 Vcb->RootIndexFcb->FcbUserReference -= 1;
829 if (
Vcb->PathTableFcb !=
NULL) {
831 Vcb->PathTableFcb->FcbReference -= 1;
832 Vcb->PathTableFcb->FcbUserReference -= 1;
835 if (
Vcb->VolumeDasdFcb !=
NULL) {
837 Vcb->VolumeDasdFcb->FcbReference -= 1;
838 Vcb->VolumeDasdFcb->FcbUserReference -= 1;
847 CdPurgeVolume( IrpContext,
Vcb,
TRUE );
862 Vcb->VcbReference -= 1;
878 FinalReference = (
BOOLEAN) ((
Vcb->VcbReference == 0) &&
890#pragma prefast(suppress: 28175, "this is a filesystem driver, touching the vpb is allowed")
900 if (!FinalReference) {
905 Vcb->SwapVpb->Size =
sizeof(
VPB );
909#pragma prefast(disable: 28175, "this is a filesystem driver, touching the vpb is allowed")
912 Vcb->SwapVpb->RealDevice->Vpb =
Vcb->SwapVpb;
964 }
else if (FinalReference) {
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
LONG CdExceptionFilter(_Inout_ PIRP_CONTEXT IrpContext, _In_ PEXCEPTION_POINTERS ExceptionPointer)
#define CDFS_RESIDUAL_USER_REFERENCE
#define CDFS_RESIDUAL_REFERENCE
#define ASSERT_EXCLUSIVE_CDDATA
#define ASSERT_IRP_CONTEXT(IC)
#define ASSERT_EXCLUSIVE_VCB(V)
BOOLEAN CdMarkDevForVerifyIfVcbMounted(_Inout_ PVCB Vcb)
VOID CdVerifyVcb(_In_ PIRP_CONTEXT IrpContext, _Inout_ PVCB Vcb)
BOOLEAN CdVerifyFcbOperation(_In_opt_ PIRP_CONTEXT IrpContext, _In_ PFCB Fcb)
#define CdAcquireCdData(IC)
VOID CdFspClose(_In_opt_ PVCB Vcb)
_Inout_ PVCB _In_ BOOLEAN Force
static INLINE BOOLEAN CdOperationIsDasdOpen(_In_ PIRP_CONTEXT IrpContext)
#define CdReleaseVcb(IC, V)
#define CdRealDevNeedsVerify(DO)
#define CdReleaseCdData(IC)
#define CdAcquireVcbShared(IC, V, I)
#define CdUnlockVcb(IC, V)
VOID CdDeleteVcb(_In_ PIRP_CONTEXT IrpContext, _Inout_ PVCB Vcb)
#define CdAcquireVcbExclusive(IC, V, I)
_Inout_ PIRP _In_ PDEVICE_OBJECT DeviceToVerify
#define CdMarkRealDevForVerify(DO)
#define CdNormalizeAndRaiseStatus(IC, S)
NTSTATUS FASTCALL CdPerformDevIoCtrl(_In_ PIRP_CONTEXT IrpContext, _In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT Device, _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _In_ BOOLEAN OverrideVerify, _Out_opt_ PIO_STATUS_BLOCK Iosb)
#define CdIsRawDevice(IC, S)
#define CdRaiseStatus(IC, S)
#define VCB_STATE_REMOVABLE_MEDIA
#define VCB_STATE_VPB_NOT_ON_DEVICE
#define VCB_STATE_DISMOUNTED
#define _Analysis_assume_lock_not_held_(lock)
#define _Requires_lock_held_(lock)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
#define ClearFlag(_F, _SF)
#define IOCTL_CDROM_CHECK_VERIFY
#define ARGUMENT_PRESENT(ArgumentPointer)
#define VPB_REMOVE_PENDING
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoReleaseVpbSpinLock(IN KIRQL Irql)
NTSTATUS NTAPI IoVerifyVolume(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN AllowRawMount)
VOID NTAPI IoAcquireVpbSpinLock(OUT PKIRQL Irql)
#define STATUS_FILE_CLOSED
#define STATUS_VOLUME_DISMOUNTED
#define STATUS_FILE_INVALID
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define IRP_MJ_QUERY_INFORMATION
PDEVICE_OBJECT DeviceObject
struct _DEVICE_OBJECT * DeviceObject
struct _DEVICE_OBJECT * RealDevice
#define CONTAINING_RECORD(address, type, field)
#define STATUS_WRONG_VOLUME
#define STATUS_VERIFY_REQUIRED
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
#define IoIsErrorUserInduced(Status)
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MN_VERIFY_VOLUME
#define FO_CLEANUP_COMPLETE
#define IRP_MN_MOUNT_VOLUME