mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
sys: FspFsvolCreateRetryComplete
This commit is contained in:
parent
79a6539caa
commit
e86f4b0836
@ -362,38 +362,7 @@ NTSTATUS FspFsvolCreatePrepare(
|
||||
FSP_FILE_DESC *FileDesc;
|
||||
PFILE_OBJECT FileObject;
|
||||
|
||||
if (FspFsctlTransactReservedKind == Request->Kind)
|
||||
{
|
||||
/*
|
||||
* This branch is not taken during IRP preparation, but rather during IRP completion
|
||||
* when FlushImageSection needs to be retried.
|
||||
*/
|
||||
FileDesc = FspIopRequestContext(Request, RequestFileDesc);
|
||||
FileNode = FileDesc->FileNode;
|
||||
FileObject = FspIopRequestContext(Request, RequestFileObject);
|
||||
|
||||
Result = FspFsvolCreateTryOpen(Irp, Request, FileNode, FileDesc, FileObject);
|
||||
if (STATUS_PENDING == Result)
|
||||
return Result;
|
||||
else
|
||||
{
|
||||
if (NT_SUCCESS(Result))
|
||||
{
|
||||
/* SUCCESS! */
|
||||
FspFileNodeSetFileInfo(FileNode, &FileDesc->State.FileInfo);
|
||||
FspIopRequestContext(Request, RequestFileDesc) = 0;
|
||||
Irp->IoStatus.Information = FILE_OPENED;
|
||||
Result = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
DEBUGLOGIRP(Irp, Result);
|
||||
|
||||
FspIopCompleteIrp(Irp, Result);
|
||||
|
||||
return FSP_STATUS_COMPLETED;
|
||||
}
|
||||
}
|
||||
else if (FspFsctlTransactCreateKind == Request->Kind)
|
||||
if (FspFsctlTransactCreateKind == Request->Kind)
|
||||
{
|
||||
SecuritySubjectContext = &IrpSp->Parameters.Create.SecurityContext->
|
||||
AccessState->SubjectSecurityContext;
|
||||
@ -718,7 +687,38 @@ NTSTATUS FspFsvolCreateRetryComplete(
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
NTSTATUS Result;
|
||||
FSP_FSCTL_TRANSACT_REQ *Request = FspIrpRequest(Irp);
|
||||
FSP_FILE_NODE *FileNode;
|
||||
FSP_FILE_DESC *FileDesc;
|
||||
PFILE_OBJECT FileObject;
|
||||
|
||||
ASSERT(FspFsctlTransactReservedKind == Request->Kind);
|
||||
|
||||
FileDesc = FspIopRequestContext(Request, RequestFileDesc);
|
||||
FileNode = FileDesc->FileNode;
|
||||
FileObject = FspIopRequestContext(Request, RequestFileObject);
|
||||
|
||||
Result = FspFsvolCreateTryOpen(Irp, Request, FileNode, FileDesc, FileObject);
|
||||
if (STATUS_PENDING == Result)
|
||||
return Result;
|
||||
else
|
||||
{
|
||||
if (NT_SUCCESS(Result))
|
||||
{
|
||||
/* SUCCESS! */
|
||||
FspFileNodeSetFileInfo(FileNode, &FileDesc->State.FileInfo);
|
||||
FspIopRequestContext(Request, RequestFileDesc) = 0;
|
||||
Irp->IoStatus.Information = FILE_OPENED;
|
||||
Result = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
DEBUGLOGIRP(Irp, Result);
|
||||
|
||||
FspIopCompleteIrp(Irp, Result);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
static NTSTATUS FspFsvolCreateTryOpen(PIRP Irp, FSP_FSCTL_TRANSACT_REQ *Request,
|
||||
@ -760,7 +760,7 @@ static NTSTATUS FspFsvolCreateTryOpen(PIRP Irp, FSP_FSCTL_TRANSACT_REQ *Request,
|
||||
Request->Kind = FspFsctlTransactReservedKind;
|
||||
}
|
||||
|
||||
FspIoqPostIrpBestEffort(FsvolDeviceExtension->Ioq, Irp, &Result);
|
||||
FspIoqRetryCompleteIrp(FsvolDeviceExtension->Ioq, Irp, &Result);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
@ -29,7 +29,6 @@
|
||||
#define FSP_STATUS_PRIVATE_BIT (0x20000000)
|
||||
#define FSP_STATUS_IOQ_POST (FSP_STATUS_PRIVATE_BIT | 0x0000)
|
||||
#define FSP_STATUS_IOQ_POST_BEST_EFFORT (FSP_STATUS_PRIVATE_BIT | 0x0001)
|
||||
#define FSP_STATUS_COMPLETED (FSP_STATUS_PRIVATE_BIT | 0x0002)
|
||||
|
||||
/* misc macros */
|
||||
#define FSP_ALLOC_INTERNAL_TAG 'IpsF'
|
||||
|
@ -594,9 +594,7 @@ NTSTATUS FspVolumeTransact(
|
||||
PendingIrpRequest = FspIrpRequest(PendingIrp);
|
||||
|
||||
Result = FspIopDispatchPrepare(PendingIrp, PendingIrpRequest);
|
||||
if (FSP_STATUS_COMPLETED == Result)
|
||||
;
|
||||
else if (STATUS_PENDING == Result)
|
||||
if (STATUS_PENDING == Result)
|
||||
{
|
||||
/*
|
||||
* The IRP has been reposted to our Ioq. Remember the first such IRP,
|
||||
|
Loading…
x
Reference in New Issue
Block a user