#include "UdfProcs.h"
Go to the source code of this file.
Defines | |
#define | BugCheckFileId (UDFS_BUG_CHECK_FSCTRL) |
#define | Dbg (UDFS_DEBUG_LEVEL_FSCTRL) |
Functions | |
INLINE VOID | UdfStoreFileSetDescriptorIfPrevailing (IN OUT PNSR_FSD *StoredFSD, IN OUT PNSR_FSD *NewFSD) |
VOID | UdfDetermineVolumeBounding (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PULONG S, IN PULONG N) |
NTSTATUS | UdfDismountVolume (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfFindAnchorVolumeDescriptor (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN OUT PNSR_ANCHOR *AnchorVolumeDescriptor) |
NTSTATUS | UdfFindFileSetDescriptor (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PLONGAD LongAd, IN OUT PNSR_FSD *FileSetDescriptor) |
NTSTATUS | UdfFindVolumeDescriptors (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PEXTENTAD Extent, IN OUT PPCB *Pcb, IN OUT PNSR_PVD *PrimaryVolumeDescriptor, IN OUT PNSR_LVOL *LogicalVolumeDescriptor) |
NTSTATUS | UdfInvalidateVolumes (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfIsPathnameValid (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
BOOLEAN | UdfIsRemount (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, OUT PVCB *OldVcb) |
UdfIsVolumeDirty (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) | |
NTSTATUS | UdfIsVolumeMounted (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfLockVolume (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfMountVolume (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfOplockRequest (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
BOOLEAN | UdfRecognizeVolume (IN PIRP_CONTEXT IrpContext, IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN OUT PBOOLEAN Bridge) |
VOID | UdfScanForDismountedVcb (IN PIRP_CONTEXT IrpContext) |
NTSTATUS | UdfUnlockVolume (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
VOID | UdfUpdateVolumeLabel (IN PIRP_CONTEXT IrpContext, IN PWCHAR VolumeLabel, IN OUT PUSHORT VolumeLabelLength, IN PUCHAR Dstring, IN UCHAR FieldLength) |
VOID | UdfUpdateVolumeSerialNumber (IN PIRP_CONTEXT IrpContext, IN OUT PULONG VolumeSerialNumber, IN PNSR_FSD Fsd) |
NTSTATUS | UdfUserFsctl (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfVerifyVolume (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
VOID | UdfStoreVolumeDescriptorIfPrevailing (IN OUT PNSR_VD_GENERIC *StoredVD, IN OUT PNSR_VD_GENERIC NewVD) |
NTSTATUS | UdfCommonFsControl (IN PIRP_CONTEXT IrpContext, IN PIRP Irp) |
NTSTATUS | UdfLockVolumeInternal (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PFILE_OBJECT FileObject OPTIONAL) |
NTSTATUS | UdfUnlockVolumeInternal (IN PIRP_CONTEXT IrpContext, IN PVCB Vcb, IN PFILE_OBJECT FileObject OPTIONAL) |
Variables | |
BOOLEAN | UdfDisable = FALSE |
|
Definition at line 28 of file udfs/fsctrl.c. |
|
Definition at line 34 of file udfs/fsctrl.c. |
|
Definition at line 283 of file udfs/fsctrl.c. References ASSERT_IRP, ASSERT_IRP_CONTEXT, IoGetCurrentIrpStackLocation, Irp, IRP_MN_MOUNT_VOLUME, IRP_MN_USER_FS_REQUEST, IRP_MN_VERIFY_VOLUME, _IO_STACK_LOCATION::MinorFunction, NTSTATUS(), PAGED_CODE, Status, UdfCompleteRequest(), UdfMountVolume(), UdfUserFsctl(), and UdfVerifyVolume(). Referenced by UdfFsdDispatch(), and UdfFspDispatch().
|
|
Definition at line 3817 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, ASSERT_VCB, Dbg, DebugTrace, DebugUnwind, FALSE, FsRtlAllocatePoolWithTag, NT_SUCCESS, NTSTATUS(), NULL, PAGED_CODE, Status, SwapCopyUchar4, TAG_CDROM_TOC, TRUE, try_leave, UdfFreePool(), UdfPagedPool, UdfPerformDevIoCtrl(), and UdfRaiseStatus(). Referenced by UdfMountVolume().
|
|
Definition at line 966 of file udfs/fsctrl.c. References DO_VERIFY_VOLUME, FALSE, _IO_STACK_LOCATION::FileObject, _DEVICE_OBJECT::Flags, FSRTL_VOLUME_DISMOUNT, FSRTL_VOLUME_DISMOUNT_FAILED, FsRtlNotifyVolumeEvent(), IoGetCurrentIrpStackLocation, Irp, NT_SUCCESS, NTSTATUS(), PAGED_CODE, _VPB::RealDevice, SetFlag, Status, UdfAcquireVcbExclusive, UdfCompleteRequest(), UdfDecodeFileObject(), UdfReleaseVcb, UserVolumeOpen, _FCB::Vcb, VCB_STATE_NOTIFY_REMOUNT, _VCB::VcbCondition, VcbMounted, _VCB::VcbState, _VCB::VolumeLockFileObject, and _VCB::Vpb. Referenced by UdfUserFsctl().
|
|
Definition at line 3307 of file udfs/fsctrl.c. References ANCHOR_SECTOR, ASSERT, ASSERT_IRP_CONTEXT, ASSERT_VCB, ClearFlag, Dbg, DebugTrace, DESTAG_ID_NSR_ANCHOR, FALSE, FsRtlAllocatePoolWithTag, LlBytesFromSectors, NSR_ANCHOR, NT_SUCCESS, NTSTATUS(), NULL, PAGED_CODE, SetFlag, Status, TAG_NSR_VDSD, TRUE, UdfMethod2TransformSector, UdfNonPagedPool, UdfRawBufferSize(), UdfRawReadSize(), UdfReadSectors(), UdfVerifyDescriptor(), and VCB_STATE_METHOD_2_FIXUP. Referenced by UdfMountVolume(), and UdfVerifyVolume().
|
|
Definition at line 2558 of file udfs/fsctrl.c. References ASSERT, ASSERT_IRP_CONTEXT, BlockOffset, BlockSize, Dbg, DebugTrace, NSR_FSD::Destag, DESTAG_ID_NOTSPEC, DESTAG_ID_NSR_FSD, DESTAG_ID_NSR_TERM, FsRtlAllocatePoolWithTag, DESTAG::Ident, NSRLENGTH::Length, LONGAD::Length, LlBytesFromBlocks, LlBytesFromSectors, NSR_FSD::NextExtent, NSR_FSD, NSRLENGTH_TYPE_RECORDED, NT_SUCCESS, NTSTATUS(), NULL, Offset, PAGED_CODE, Status, TAG_NSR_FSD, TRUE, try_leave, UdfExceptionFilter(), UdfFreePool(), UdfLookupPsnOfExtent(), UdfNonPagedPool, UdfRawBufferSize(), UdfRawReadSize(), UdfReadSectors(), UdfStoreFileSetDescriptorIfPrevailing(), and UdfVerifyDescriptor(). Referenced by UdfMountVolume(), and UdfVerifyVolume().
|
|
Definition at line 2832 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, ASSERT_OPTIONAL_PCB, ASSERT_VCB, NSR_LVOL::BlockSize, NSR_LVOL::Charset, NSR_PVD::CharsetDesc, NSR_PVD::CharsetExplan, NSR_PVD::CharSetList, NSR_PVD::CharSetListMax, CHARSPEC_T_CS0, NSR_PART::ContentsID, Dbg, DebugTrace, DebugUnwind, NSR_PART::Destag, NSR_VD_GENERIC::Destag, DESTAG_ID_MAXIMUM_PART3, DESTAG_ID_NSR_LVOL, DESTAG_ID_NSR_PART, DESTAG_ID_NSR_PVD, DESTAG_ID_NSR_TERM, DESTAG_ID_NSR_VDP, NSR_LVOL::DomainID, FsRtlAllocatePoolWithTag, DESTAG::Ident, ISONsrLvolSize, LlBytesFromSectors, NSR_LVOL::MapTableCount, NSR_VD_GENERIC, NT_SUCCESS, NTSTATUS(), NULL, Offset, PAGED_CODE, PNSR_VDP, SectorsFromBytes, SectorSize, Status, TAG_NSR_VDSD, TRUE, try_leave, UDF_CHARSETLIST, UDF_VERSION_MINIMUM, UDF_VERSION_RECOGNIZED, UdfAddToPcb(), UdfCS0Identifier, UdfDomainIdentifier, UdfDomainIdentifierContained(), UdfEqualCharspec(), UdfEqualEntityId(), UdfFreePool(), UdfInitializePcb(), UdfNonPagedPool, UdfNSR02Identifier, UdfRawBufferSize(), UdfRawReadSize(), UdfReadSectors(), UdfStoreVolumeDescriptorIfPrevailing(), UdfVerifyDescriptor(), NSR_PVD::VolSetSeq, and NSR_PVD::VolSetSeqMax. Referenced by UdfMountVolume(), and UdfVerifyVolume().
|
|
Definition at line 1271 of file udfs/fsctrl.c. References _IRP::AssociatedIrp, ClearFlag, _FILE_OBJECT::DeviceObject, ExAllocatePoolWithTag, FALSE, FlagOn, _VPB::Flags, Handle, IO_TYPE_VPB, IoAcquireVpbSpinLock(), IoFileObjectType, IoGetCurrentIrpStackLocation, IoReleaseVpbSpinLock(), Irp, IRP_CONTEXT_FLAG_FORCE_POST, IRP_CONTEXT_FLAG_WAIT, KernelMode, NonPagedPoolMustSucceed, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), _IO_STACK_LOCATION::Parameters, _VPB::RealDevice, _IRP::RequestorMode, SeSinglePrivilegeCheck(), SetFlag, _VPB::Size, Status, TAG_VPB, TcbPrivilege, _VPB::Type, UdfAcquireUdfData, UdfCheckForDismount(), UdfCompleteRequest(), UdfData, UdfLockVcb, UdfPurgeVolume(), UdfReleaseUdfData, UdfUnlockVcb, VCB, _VCB::VcbCondition, VcbDismountInProgress, VcbInvalid, _UDF_DATA::VcbQueue, _VCB::Vpb, _DEVICE_OBJECT::Vpb, VPB, and VPB_REMOVE_PENDING. Referenced by UdfUserFsctl().
|
|
Definition at line 1236 of file udfs/fsctrl.c. References Irp, PAGED_CODE, and UdfCompleteRequest(). Referenced by UdfUserFsctl().
|
|
Definition at line 2439 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, ASSERT_VCB, Dbg, DebugTrace, FALSE, PAGED_CODE, _VPB::RealDevice, _VPB::SerialNumber, TRUE, UdfData, VcbNotMounted, _UDF_DATA::VcbQueue, _VPB::VolumeLabel, and _VPB::VolumeLabelLength. Referenced by UdfMountVolume().
|
|
Definition at line 1064 of file udfs/fsctrl.c. References _IRP::AssociatedIrp, _IO_STACK_LOCATION::FileObject, IoGetCurrentIrpStackLocation, _IRP::IoStatus, Irp, _IRP::MdlAddress, MmGetSystemAddressForMdlSafe, NormalPagePriority, NULL, _IO_STACK_LOCATION::Parameters, TYPE_OF_OPEN, UdfCompleteRequest(), UdfDecodeFileObject(), UserVolumeOpen, _FCB::Vcb, _VCB::VcbCondition, and VcbMounted. Referenced by UdfUserFsctl().
|
|
Definition at line 1175 of file udfs/fsctrl.c. References _IO_STACK_LOCATION::FileObject, IoGetCurrentIrpStackLocation, Irp, IRP_CONTEXT_FLAG_DISABLE_POPUPS, NULL, PAGED_CODE, SetFlag, UdfCompleteRequest(), UdfDecodeFileObject(), UdfVerifyVcb(), and _FCB::Vcb. Referenced by UdfUserFsctl().
|
|
Definition at line 780 of file udfs/fsctrl.c. References FALSE, _IO_STACK_LOCATION::FileObject, FSRTL_VOLUME_LOCK, FSRTL_VOLUME_LOCK_FAILED, FsRtlNotifyVolumeEvent(), IoGetCurrentIrpStackLocation, Irp, NT_SUCCESS, NTSTATUS(), PAGED_CODE, Status, UdfAcquireVcbExclusive, UdfCompleteRequest(), UdfDecodeFileObject(), UdfLockVolumeInternal(), UdfReleaseVcb, UdfVerifyVcb(), UserVolumeOpen, and _FCB::Vcb. Referenced by UdfUserFsctl().
|
|
Definition at line 621 of file udfs/fsctrl.c. References ASSERT_EXCLUSIVE_VCB, CcWaitForCurrentLazyWriterActivity(), FALSE, FlagOn, IRP_CONTEXT_FLAG_WAIT, NT_SUCCESS, NTSTATUS(), PAGED_CODE, SetFlag, Status, UdfAcquireVcbExclusive, UdfFspClose(), UdfPurgeVolume(), UdfReleaseVcb, and VCB_STATE_LOCKED. Referenced by UdfLockVolume(), and UdfPnpQueryRemove().
|
|
Definition at line 1444 of file udfs/fsctrl.c. References _DEVICE_OBJECT::AlignmentRequirement, ASSERT, ASSERT_IRP, ASSERT_IRP_CONTEXT, _VCB::BoundN, _VCB::BoundS, ClearFlag, Dbg, DebugTrace, DebugUnwind, DEVICE_OBJECT, _VPB::DeviceObject, _DEVICE_OBJECT::DeviceType, DO_DEVICE_INITIALIZING, DO_VERIFY_VOLUME, _UDF_DATA::DriverObject, FALSE, FlagOn, _DEVICE_OBJECT::Flags, NSR_LVOL::FSD, FSRTL_VOLUME_MOUNT, FsRtlNotifyVolumeEvent(), IoCreateDevice(), IoDeleteDevice(), IoGetCurrentIrpStackLocation, Irp, IRP_CONTEXT_FLAG_WAIT, KeInitializeSpinLock(), NSR_ANCHOR::Main, _VCB::MediaChangeCount, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObject, PAGED_CODE, _IO_STACK_LOCATION::Parameters, _VCB::Pcb, PVOLUME_DEVICE_OBJECT, _VPB::RealDevice, _VPB::ReferenceCount, NSR_ANCHOR::Reserve, _VCB::RootIndexFcb, _VPB::SerialNumber, SetFlag, _DEVICE_OBJECT::StackSize, Status, _VCB::TargetDeviceObject, TRUE, try_leave, UdfAcquireUdfData, UdfAcquireVcbExclusive, UdfCompletePcb(), UdfCompleteRequest(), UdfData, UdfDeletePcb(), UdfDetermineVolumeBounding(), UdfDisable, UdfDismountVcb(), UdfFindAnchorVolumeDescriptor(), UdfFindFileSetDescriptor(), UdfFindVolumeDescriptors(), UdfFreePool(), UdfHighBit(), UdfInitializeVcb(), UdfIsRemount(), UdfPerformDevIoCtrl(), UdfRecognizeVolume(), UdfReleaseUdfData, UdfReleaseVcb, UdfScanForDismountedVcb(), UdfUpdateVcbPhase0(), UdfUpdateVcbPhase1(), UdfUpdateVolumeLabel(), UdfUpdateVolumeSerialNumber(), VCB_STATE_METHOD_2_FIXUP, VCB_STATE_NOTIFY_REMOUNT, _VCB::VcbCondition, VcbMounted, _VCB::VcbReference, _VCB::VcbResidualReference, _VCB::VcbState, VOLUME_DEVICE_OBJECT, NSR_LVOL::VolumeID, _VPB::VolumeLabel, _VPB::VolumeLabelLength, _DEVICE_OBJECT::Vpb, and _VCB::Vpb. Referenced by UdfCommonFsControl().
|
|
Definition at line 470 of file udfs/fsctrl.c. References ClearFlag, FALSE, _FCB::FcbCleanup, _IO_STACK_LOCATION::FileObject, FsRtlAreThereCurrentFileLocks, FsRtlOplockFsctrl(), IoGetCurrentIrpStackLocation, Irp, IRP_CONTEXT_FLAG_FORCE_POST, IRP_CONTEXT_FLAG_WAIT, NTSTATUS(), NULL, PAGED_CODE, _IO_STACK_LOCATION::Parameters, SetFlag, Status, UdfAcquireFcbExclusive, UdfAcquireFcbShared, UdfCompleteRequest(), UdfDecodeFileObject(), UdfIsFastIoPossible, UdfLockFcb, UdfReleaseFcb, UdfUnlockFcb, UdfVerifyFcbOperation(), and UserFileOpen. Referenced by UdfUserFsctl().
|
|
Definition at line 3457 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, Dbg, DebugTrace, DebugUnwind, FALSE, FsRtlAllocatePoolWithTag, VSD_GENERIC::Ident, NT_SUCCESS, NTSTATUS(), Offset, PAGED_CODE, PVSD_GENERIC, SectorAlignN, SectorSize, Status, TAG_NSR_VSD, TRUE, VSD_GENERIC::Type, UdfFindInParseTable(), UdfFreePool(), UdfIsRawDevice, UdfNonPagedPool, UdfRawBufferSizeN(), UdfRawReadSizeN(), UdfReadSectors(), VSD_GENERIC::Version, VRA_BOUNDARY_LOCATION, VSD_GENERIC, VSD_LENGTH_IDENT, VsdIdentBEA01, VsdIdentBOOT2, VsdIdentCD001, VsdIdentCDROM, VsdIdentCDW01, VsdIdentCDW02, VsdIdentNSR01, VsdIdentNSR02, VsdIdentParseTable, and VsdIdentTEA01. Referenced by UdfMountVolume().
|
|
Definition at line 3749 of file udfs/fsctrl.c. References ASSERT_EXCLUSIVE_UDFDATA, ASSERT_IRP_CONTEXT, FALSE, PAGED_CODE, UdfCheckForDismount(), UdfData, _VCB::VcbCondition, VcbDismountInProgress, VcbInvalid, VcbNotMounted, _UDF_DATA::VcbQueue, _VCB::VcbReference, and _VCB::VcbResidualReference. Referenced by UdfMountVolume().
|
|
Definition at line 48 of file udfs/fsctrl.c. References NULL, and PNSR_FSD. Referenced by UdfFindFileSetDescriptor().
|
|
Definition at line 235 of file udfs/fsctrl.c. References FsRtlAllocatePoolWithTag, NULL, TAG_NSR_VDSD, and UdfNonPagedPool. Referenced by UdfAddToPcb(), and UdfFindVolumeDescriptors().
|
|
Definition at line 877 of file udfs/fsctrl.c. References FALSE, _IO_STACK_LOCATION::FileObject, FSRTL_VOLUME_UNLOCK, FsRtlNotifyVolumeEvent(), IoGetCurrentIrpStackLocation, Irp, NT_SUCCESS, NTSTATUS(), PAGED_CODE, Status, UdfAcquireVcbExclusive, UdfCompleteRequest(), UdfDecodeFileObject(), UdfReleaseVcb, UdfUnlockVolumeInternal(), UserVolumeOpen, and _FCB::Vcb. Referenced by UdfUserFsctl().
|
|
Definition at line 732 of file udfs/fsctrl.c. References ClearFlag, FlagOn, NTSTATUS(), NULL, Status, and VCB_STATE_LOCKED. Referenced by UdfPnpCancelRemove(), UdfPnpRemove(), and UdfUnlockVolume().
|
|
Definition at line 4056 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, Dbg, DebugTrace, MAXIMUM_VOLUME_LABEL_LENGTH, PAGED_CODE, TRUE, UdfCheckLegalCS0Dstring(), and UdfConvertCS0DstringToUnicode(). Referenced by UdfMountVolume(), and UdfVerifyVolume().
|
|
Definition at line 4165 of file udfs/fsctrl.c. References ASSERT_IRP_CONTEXT, PAGED_CODE, SwapCopyUchar4, and UdfSerial32(). Referenced by UdfMountVolume(), and UdfVerifyVolume().
|
|
Definition at line 363 of file udfs/fsctrl.c. References IoGetCurrentIrpStackLocation, Irp, NTSTATUS(), PAGED_CODE, _IO_STACK_LOCATION::Parameters, Status, UdfCompleteRequest(), UdfDismountVolume(), UdfInvalidateVolumes(), UdfIsPathnameValid(), UdfIsVolumeDirty(), UdfIsVolumeMounted(), UdfLockVolume(), UdfOplockRequest(), and UdfUnlockVolume(). Referenced by UdfCommonFsControl().
|
|
Definition at line 2043 of file udfs/fsctrl.c. References ASSERT, ASSERT_IRP_CONTEXT, ASSERT_VCB, ClearFlag, Dbg, DebugTrace, _DEVICE_OBJECT::DeviceType, DO_VERIFY_VOLUME, FALSE, FlagOn, _IO_STACK_LOCATION::Flags, _DEVICE_OBJECT::Flags, NSR_LVOL::FSD, FSRTL_VOLUME_MOUNT, FsRtlNotifyVolumeEvent(), Index, IoGetCurrentIrpStackLocation, Irp, NSR_ANCHOR::Main, MAXIMUM_VOLUME_LABEL_LENGTH, _VCB::MediaChangeCount, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObject, PAGED_CODE, _IO_STACK_LOCATION::Parameters, _VCB::Pcb, _VPB::RealDevice, NSR_ANCHOR::Reserve, _VCB::RootIndexFcb, _VPB::SerialNumber, SL_ALLOW_RAW_MOUNT, Status, _VCB::TargetDeviceObject, TRUE, try_leave, UdfAcquireUdfData, UdfAcquireVcbExclusive, UdfCheckForDismount(), UdfCompletePcb(), UdfCompleteRequest(), UdfDeletePcb(), UdfEquivalentPcb(), UdfFindAnchorVolumeDescriptor(), UdfFindFileSetDescriptor(), UdfFindVolumeDescriptors(), UdfFreePool(), UdfPerformDevIoCtrl(), UdfPurgeVolume(), UdfReleaseUdfData, UdfReleaseVcb, UdfUpdateVolumeLabel(), UdfUpdateVolumeSerialNumber(), USHORT, VCB_STATE_NOTIFY_REMOUNT, _VCB::VcbCleanup, _VCB::VcbCondition, VcbMounted, VcbNotMounted, _VCB::VcbState, NSR_LVOL::VolumeID, _VPB::VolumeLabel, _VPB::VolumeLabelLength, and _VCB::Vpb. Referenced by UdfCommonFsControl().
|
|
Definition at line 40 of file udfs/fsctrl.c. Referenced by UdfMountVolume(). |