I’m saying the close is on a different FileObject then the subsequent
cleanup and write. Since IRP_MJ_CLOSE means deleting the FileObject, i.e.
freeing the memory for it, this must be the case.
Do some reading in the archives about stream file objects.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@comcast.net
Sent: Monday, February 12, 2007 2:31 PM
To: Windows File Systems Devs Interest List
Subject: RE:[ntfsd] IFS close issue
The dispather looks like:
NTSTATUS DispatchIrp(
IN DEVICE_OBJECT pDeviceObject,
IN PIRP pIrp
)
{
IRP_CONTEXT pIrpContext = NULL;
pIrpContext = AllocateIrpContext(pDeviceObject, pIrp);
if (pIrpContext == NULL)
{
CompleteRequest(pIrp, STATUS_INSUFFICIENT_RESOURCES, 0);
return STATUS_INSUFFICIENT_RESOURCES;
}
return DispatchRequest(pIrpContext);
}
Where,
NTSTATUS DispatchRequest(
IN PIRP_CONTEXT pIrpContext
)
{
ASSERT(pIrpContext != NULL);
switch (pIrpContext->MajorFunction)
{
case IRP_MJ_CREATE:
return Create(pIrpContext);
case IRP_MJ_CLEANUP:
return Cleanup(pIrpContext);
case IRP_MJ_CLOSE:
return Close(pIrpContext);
case IRP_MJ_QUERY_INFORMATION:
return QueryInformation(pIrpContext);
case IRP_MJ_DIRECTORY_CONTROL:
return DirectoryControl(pIrpContext);
case IRP_MJ_QUERY_VOLUME_INFORMATION:
return QueryVolumeInformation(pIrpContext);
case IRP_MJ_READ:
return Read(pIrpContext);
case IRP_MJ_WRITE:
return Write(pIrpContext);
case IRP_MJ_SET_INFORMATION:
…
default:
CompleteIrpContext(pIrpContext, STATUS_NOT_IMPLEMENTED, 0);
return STATUS_NOT_IMPLEMENTED;
}
}
In this case I see IRP_MJ_CLOSE after the first or second write followed by
another write(s). The Close() routine passes the close request to a service
and returns. I’m not currently performing a check for the ReferenceCount
dropping to 0 because I didn’t think I’d get a IRP_MJ_CLOSE unless the
writes were already completed. Dan are you saying the CLOSE shouldn’t be
seen until the writes are done (I only see the one)? Should I re-queue the
request?
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com