mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[CDFS]
- Fix infinite loop of verification and read attempts when a disc change occurs on VMware while ROS is running svn path=/trunk/; revision=54750
This commit is contained in:
parent
aa885e24d7
commit
eec24f8325
1 changed files with 13 additions and 4 deletions
|
@ -49,6 +49,7 @@ CdfsReadSectors(IN PDEVICE_OBJECT DeviceObject,
|
|||
KEVENT Event;
|
||||
PIRP Irp;
|
||||
NTSTATUS Status;
|
||||
BOOLEAN LastChance = FALSE;
|
||||
|
||||
again:
|
||||
KeInitializeEvent(&Event,
|
||||
|
@ -104,18 +105,26 @@ again:
|
|||
{
|
||||
PDEVICE_OBJECT DeviceToVerify;
|
||||
|
||||
DPRINT1("STATUS_VERIFY_REQUIRED\n");
|
||||
DeviceToVerify = IoGetDeviceToVerify(PsGetCurrentThread());
|
||||
IoSetDeviceToVerify(PsGetCurrentThread(), NULL);
|
||||
|
||||
Status = IoVerifyVolume(DeviceToVerify, FALSE);
|
||||
DPRINT1("IoVerifyVolume() returned (Status %lx)\n", Status);
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
if (NT_SUCCESS(Status) && !LastChance)
|
||||
{
|
||||
DPRINT1("Volume verify succeeded; trying request again\n");
|
||||
DPRINT("Volume verify succeeded; trying request again\n");
|
||||
LastChance = TRUE;
|
||||
goto again;
|
||||
}
|
||||
else if (NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to read after successful verify, aborting\n");
|
||||
Status = STATUS_DEVICE_NOT_READY;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("IoVerifyVolume() failed (Status %lx)\n", Status);
|
||||
}
|
||||
}
|
||||
|
||||
DPRINT("CdfsReadSectors() failed (Status %x)\n", Status);
|
||||
|
|
Loading…
Reference in a new issue