mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user