// ntifs.h
VOID IoAcquireVpbSpinLock(
[out] PKIRQL Irql
);
View the official Windows Driver Kit DDI reference
No description available.
The IoAcquireVpbSpinLock routine acquires the Volume Parameter Block (VPB) spin lock.
Irql
[out]Pointer to a caller-allocated variable in which to save the current IRQL for a subsequent call to IoReleaseVpbSpinLock. Usually the Irql is saved on the stack as a local variable.
File systems call IoAcquireVpbSpinLock to acquire the VPB spin lock. This global spin lock must be acquired before accessing any of the following fields of a VPB:
Flags (specifically, VPB_MOUNTED)
DeviceObject
RealDevice
ReferenceCount
Every successful call to IoAcquireVpbSpinLock must be matched by a subsequent call to IoReleaseVpbSpinLock. To prevent deadlock, the holder of the VPB spin lock must release it immediately when it is no longer needed.
Before using IoAcquireVpbSpinLock and IoReleaseVpbSpinLock, driver writers are strongly encouraged to study the way these routines are used in the FASTFAT sample.
After calling IoAcquireVpbSpinLock, the caller executes at IRQL DISPATCH_LEVEL. Calling IoReleaseVpbSpinLock restores the caller's original IRQL.