I am using the common technique of doing an IRP_MJ_READ embedded in an
IRP_MJ_CREATE completion routine. The extremely stripped down code is shown
below. I use it with a test application that opens and closes a standard file
in a tight loop. After thousands of iterations, Windows 2003 Server starts
reporting “Insufficient Resources” for any old thing. (Task Manager shows NP
Kernel memory as severly depleted.) Windows 2000, NT, and even XP do not seem
to exhibit the same problem.
The problem seems to occur only if I specify IRP_NOCACHE in the embedded
IRP_MJ_READ. If I omit it, everything runs fine. Incidentally, the test file
I am using is NOT opened with NIFB.
Any idea why Windows 2003 server would care about IRP_NOCACHE, and other
Windows versions seem not to care? Any idea of the dynamics?
Thanks for any tips.
Neil
== > MyCreateCompletionRoutine::
irpSp = IoGetCurrentIrpStackLocation(Irp);
myBuffer = ExAllocatePoolWithTag(NonPagedPool, MYBUFFER_SIZE,‘TEST’);
myIrp =
oAllocateIrp(DeviceObject->DeviceExtension->FileSystemDeviceObject->StackSize,
FALSE);
myIrp->Tail.Overlay.Thread = PsGetCurrentThread();
myIrp->Tail.Overlay.OriginalFileObject = irpSp->FileObject;
myIrp->RequestorMode = KernelMode;
myIrp->UserBuffer = myBuffer;
// if next line omits IRP_NOCACHE it works!
myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE | IRP_DEFER_IO_COMPLETION;
myIrpSP->FileObject = irpSp->FileObject;
myIrpSp = IoGetNextIrpStackLocation(myIrp);
myIrpSP->DeviceObject = deviceExtension->FileSystemDeviceObject;
myIrpSP->Parameters.Read.Length = MYBUFFER_SIZE;
myIrpSP->Parameters.Read.ByteOffset.QuadPart = 0;
myIrpSP->MajorFunction = IRP_MJ_READ;
KeInitializeEvent(&completionEvent, NotificationEvent, FALSE);
IoSetCompletionRoutine(myIrp, _SyncComplete, &completionEvent, TRUE, TRUE,
TRUE);
if ((ntStatus =
IoCallDriver(DeviceObject->DeviceExtension->FileSystemDeviceObject, myIrp)) ==
STATUS_PENDING)
{
KeWaitForSingleObject(&completionEvent, Executive, KernelMode, TRUE,
NULL);
ntStatus = myIrp->IoStatus.Status;
}
// incidentally - above loop always succeeds
IoFreeIrp(myIrp);
ExFreePool(myBuffer);
if (Irp->PendingReturned) IoMarkIrpPending(Irp);
rreturn (STATUS_SUCCESS);
I’m probably pointing to the omitted part, but did you initialize the myIrpSp?
I had a similar yet reverse problem: IRP_NOCACHE would HANG on Windows 2000, but
not on XP and 2003. This was on Lanman, though (not on any other FS).
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Sorry - yes - in my stripping down job I accidentally placed it in the wrong
location. Here it is with it correctly placed (see line after myIrp->Flags).
irpSp = IoGetCurrentIrpStackLocation(Irp);
myBuffer = ExAllocatePoolWithTag(NonPagedPool, MYBUFFER_SIZE,‘TEST’);
myIrp =
oAllocateIrp(DeviceObject->DeviceExtension->FileSystemDeviceObject->StackSize,
FALSE);
myIrp->Tail.Overlay.Thread = PsGetCurrentThread();
myIrp->Tail.Overlay.OriginalFileObject = irpSp->FileObject;
myIrp->RequestorMode = KernelMode;
myIrp->UserBuffer = myBuffer;
// if next line omits IRP_NOCACHE it works!
myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE | IRP_DEFER_IO_COMPLETION;
myIrpSp = IoGetNextIrpStackLocation(myIrp);
myIrpSP->FileObject = irpSp->FileObject;
myIrpSP->DeviceObject = deviceExtension->FileSystemDeviceObject;
myIrpSP->Parameters.Read.Length = MYBUFFER_SIZE;
myIrpSP->Parameters.Read.ByteOffset.QuadPart = 0;
myIrpSP->MajorFunction = IRP_MJ_READ;
KeInitializeEvent(&completionEvent, NotificationEvent, FALSE);
IoSetCompletionRoutine(myIrp, _SyncComplete, &completionEvent, TRUE, TRUE,
TRUE);
if ((ntStatus =
IoCallDriver(DeviceObject->DeviceExtension->FileSystemDeviceObject, myIrp)) ==
STATUS_PENDING)
{
KeWaitForSingleObject(&completionEvent, Executive, KernelMode, TRUE,
NULL);
ntStatus = myIrp->IoStatus.Status;
}
// incidentally - above loop always succeeds
IoFreeIrp(myIrp);
ExFreePool(myBuffer);
if (Irp->PendingReturned) IoMarkIrpPending(Irp);
rreturn (STATUS_SUCCESS);
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Friday, July 02, 2004 5:50 PM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
I’m probably pointing to the omitted part, but did you initialize the
myIrpSp?
I had a similar yet reverse problem: IRP_NOCACHE would HANG on Windows
2000, but
not on XP and 2003. This was on Lanman, though (not on any other FS).
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
The obvious answer here is that you are leaking memory for some reason.
An obvious response is to ask if you have you run !poolused to see if
you can see what is being leaked?
Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neil Weicher
Sent: Friday, July 02, 2004 7:27 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Sorry - yes - in my stripping down job I accidentally placed it in the
wrong
location. Here it is with it correctly placed (see line after
myIrp->Flags).
irpSp = IoGetCurrentIrpStackLocation(Irp);
myBuffer = ExAllocatePoolWithTag(NonPagedPool, MYBUFFER_SIZE,‘TEST’);
myIrp =
oAllocateIrp(DeviceObject->DeviceExtension->FileSystemDeviceObject->Stac
kSize,
FALSE);
myIrp->Tail.Overlay.Thread = PsGetCurrentThread();
myIrp->Tail.Overlay.OriginalFileObject = irpSp->FileObject;
myIrp->RequestorMode = KernelMode;
myIrp->UserBuffer = myBuffer;
// if next line omits IRP_NOCACHE it works!
myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE |
IRP_DEFER_IO_COMPLETION;
myIrpSp = IoGetNextIrpStackLocation(myIrp);
myIrpSP->FileObject = irpSp->FileObject;
myIrpSP->DeviceObject = deviceExtension->FileSystemDeviceObject;
myIrpSP->Parameters.Read.Length = MYBUFFER_SIZE;
myIrpSP->Parameters.Read.ByteOffset.QuadPart = 0;
myIrpSP->MajorFunction = IRP_MJ_READ;
KeInitializeEvent(&completionEvent, NotificationEvent, FALSE);
IoSetCompletionRoutine(myIrp, _SyncComplete, &completionEvent, TRUE,
TRUE,
TRUE);
if ((ntStatus =
IoCallDriver(DeviceObject->DeviceExtension->FileSystemDeviceObject,
myIrp)) ==
STATUS_PENDING)
{
KeWaitForSingleObject(&completionEvent, Executive, KernelMode, TRUE,
NULL);
ntStatus = myIrp->IoStatus.Status;
}
// incidentally - above loop always succeeds
IoFreeIrp(myIrp);
ExFreePool(myBuffer);
if (Irp->PendingReturned) IoMarkIrpPending(Irp);
rreturn (STATUS_SUCCESS);
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Friday, July 02, 2004 5:50 PM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
I’m probably pointing to the omitted part, but did you initialize
the
myIrpSp?
I had a similar yet reverse problem: IRP_NOCACHE would HANG on
Windows
2000, but
not on XP and 2003. This was on Lanman, though (not on any other FS).
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Here are the 3 things I think make the difference (again, I only had trouble with
Lanman on Windows 2000, and it’s probably not related to your case)
Try specifying the original RequestorMode (though that can cause permission
denied as security is not bypassed).
What is the use of IRP_DEFER_IO_COMPLETION here? IIRC, it’s related to
SystemBuffer only, which you’re not setting.
BTW, Neal C. mentioned a few days ago, not to set the OriginalFileObject field.
myIrp->RequestorMode = KernelMode;
myIrp->UserBuffer = myBuffer;
myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE | IRP_DEFER_IO_COMPLETION;
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
I looked at my code hundreds of times and put in various checkpoints. I am
convinced that I am not leaking memory, but something I am doing must be
causing 2003 to leak memory. The Pool allocation is being freed each time,
as is the irp. But I will check the !poolused as you suggested.
Thanks for the feedback.
Neil
----- Original Message -----
From: “Neal Christiansen”
To: “Windows File Systems Devs Interest List”
Sent: Saturday, July 03, 2004 11:05 AM
Subject: RE: [ntfsd] IRP_NOCACHE and Windows 2003 Server
The obvious answer here is that you are leaking memory for some reason.
An obvious response is to ask if you have you run !poolused to see if
you can see what is being leaked?
Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neil Weicher
Sent: Friday, July 02, 2004 7:27 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Sorry - yes - in my stripping down job I accidentally placed it in the
wrong
location. Here it is with it correctly placed (see line after
myIrp->Flags).
------------------
irpSp = IoGetCurrentIrpStackLocation(Irp);
myBuffer = ExAllocatePoolWithTag(NonPagedPool, MYBUFFER_SIZE,‘TEST’);
myIrp =
oAllocateIrp(DeviceObject->DeviceExtension->FileSystemDeviceObject->Stac
kSize,
FALSE);
myIrp->Tail.Overlay.Thread = PsGetCurrentThread();
myIrp->Tail.Overlay.OriginalFileObject = irpSp->FileObject;
myIrp->RequestorMode = KernelMode;
myIrp->UserBuffer = myBuffer;
// if next line omits IRP_NOCACHE it works!
myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE |
IRP_DEFER_IO_COMPLETION;
myIrpSp = IoGetNextIrpStackLocation(myIrp);
myIrpSP->FileObject = irpSp->FileObject;
myIrpSP->DeviceObject = deviceExtension->FileSystemDeviceObject;
myIrpSP->Parameters.Read.Length = MYBUFFER_SIZE;
myIrpSP->Parameters.Read.ByteOffset.QuadPart = 0;
myIrpSP->MajorFunction = IRP_MJ_READ;
KeInitializeEvent(&completionEvent, NotificationEvent, FALSE);
IoSetCompletionRoutine(myIrp, _SyncComplete, &completionEvent, TRUE,
TRUE,
TRUE);
if ((ntStatus =
IoCallDriver(DeviceObject->DeviceExtension->FileSystemDeviceObject,
myIrp)) ==
STATUS_PENDING)
{
KeWaitForSingleObject(&completionEvent, Executive, KernelMode, TRUE,
NULL);
ntStatus = myIrp->IoStatus.Status;
}
// incidentally - above loop always succeeds
IoFreeIrp(myIrp);
ExFreePool(myBuffer);
if (Irp->PendingReturned) IoMarkIrpPending(Irp);
rreturn (STATUS_SUCCESS);
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Friday, July 02, 2004 5:50 PM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
I’m probably pointing to the omitted part, but did you initialize
the
myIrpSp?
I had a similar yet reverse problem: IRP_NOCACHE would HANG on
Windows
2000, but
not on XP and 2003. This was on Lanman, though (not on any other FS).
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Thanks for the feedback. Since it is possible (although extremely unlikely)
that the completion routine might not be associated with a thread, I thought
the IRP_DEFER_IO_COMPLETION would be needed, or at worst harmless, but I am
certainly not the last word on this.
I will explore that and the other points.
Thanks again.
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Saturday, July 03, 2004 11:10 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Here are the 3 things I think make the difference (again, I only had
trouble with
Lanman on Windows 2000, and it’s probably not related to your case)
Try specifying the original RequestorMode (though that can cause
permission
denied as security is not bypassed).
What is the use of IRP_DEFER_IO_COMPLETION here? IIRC, it’s related to
SystemBuffer only, which you’re not setting.
BTW, Neal C. mentioned a few days ago, not to set the OriginalFileObject
field.
> myIrp->RequestorMode = KernelMode;
> myIrp->UserBuffer = myBuffer;
> myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE | IRP_DEFER_IO_COMPLETION;
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Dejan,
Ok, I am sure this will be helpful to a lot of other people, too: the
suggestion that appeared to do the trick is using the original
RequestorMode, i.e., I changed:
myIrp->RequestorMode = KernelMode
to
myIrp->RequestorMode = Irp->RequestorMode
I am glad that it seemed to fix the problem. Even more, I’d appreciate
understanding the dynamics, and why only 2003 server seemed to care.
Anybody?
Thanks for the help.
Neil
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Saturday, July 03, 2004 11:10 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Here are the 3 things I think make the difference (again, I only had
trouble with
Lanman on Windows 2000, and it’s probably not related to your case)
Try specifying the original RequestorMode (though that can cause
permission
denied as security is not bypassed).
What is the use of IRP_DEFER_IO_COMPLETION here? IIRC, it’s related to
SystemBuffer only, which you’re not setting.
BTW, Neal C. mentioned a few days ago, not to set the OriginalFileObject
field.
> myIrp->RequestorMode = KernelMode;
> myIrp->UserBuffer = myBuffer;
> myIrp->Flags = IRP_READ_OPERATION | IRP_NOCACHE | IRP_DEFER_IO_COMPLETION;
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
I am surprised such things work even - I thought when I tested them a year+ ago
that it would be give some error (as the memory for user buffer is in kernel space:-)
I’d like to know the same. There’s one more trick for those filtering Lanman: on
Windows 2000, the only way I saw not to freeze a system when accessing a UNC file was
to specify IRP_PAGING_IO (I wouldn’t do this for a local FS).
Ok, I am sure this will be helpful to a lot of other people, too: the
suggestion that appeared to do the trick is using the original
RequestorMode, i.e., I changed:
myIrp->RequestorMode = KernelMode
to
myIrp->RequestorMode = Irp->RequestorMode
I am glad that it seemed to fix the problem. Even more, I’d appreciate
understanding the dynamics, and why only 2003 server seemed to care. Anybody?
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Yes - I guess it is surprising. OTOH, the RequestorMode refers to the mode
the handle was created in, which in most cases, is UserMode. I believe that
Windows NT, 2K and XP perform the entire IRP_MJ_CREATE in User mode.
Maybe that has changed in 2003.
Neil
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 05, 2004 9:14 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
I am surprised such things work even - I thought when I tested them a
year+ ago
that it would be give some error (as the memory for user buffer is in kernel
space:-)
I’d like to know the same. There’s one more trick for those filtering
Lanman: on
Windows 2000, the only way I saw not to freeze a system when accessing a UNC
file was
to specify IRP_PAGING_IO (I wouldn’t do this for a local FS).
> Ok, I am sure this will be helpful to a lot of other people, too: the
> suggestion that appeared to do the trick is using the original
> RequestorMode, i.e., I changed:
> myIrp->RequestorMode = KernelMode
> to
> myIrp->RequestorMode = Irp->RequestorMode
>
> I am glad that it seemed to fix the problem. Even more, I’d appreciate
> understanding the dynamics, and why only 2003 server seemed to care.
Anybody?
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
If you can reproduce it on FAT (you didn’t mention what FS this happens on),
tracing through FAT code might help.
Looking at your original e-mail you said: “Incidentally, the test file
I am using is NOT opened with NIFB” - what is NIFB?
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
“No Intermediate File Buffering” was my guess from context.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Monday, July 05, 2004 2:14 PM
To: ntfsd redirect
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
If you can reproduce it on FAT (you didn’t mention what FS this
happens on), tracing through FAT code might help.
Looking at your original e-mail you said: “Incidentally, the test
file I am using is NOT opened with NIFB” - what is NIFB?
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com Alfa Transparent File
Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
Hmm:-) (gotta recruit the little gray cells more often:-)
Tony Mason wrote:
“No Intermediate File Buffering” was my guess from context.
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Well, most people here in the US are working on killing their gray cells
this weekend, with the Independence Day holiday. Only the truly
hard-core amongst us are at work!
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Monday, July 05, 2004 3:00 PM
To: ntfsd redirect
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Hmm:-) (gotta recruit the little gray cells more often:-)
Tony Mason wrote:
“No Intermediate File Buffering” was my guess from context.
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com Alfa Transparent File
Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com To unsubscribe
send a blank email to xxxxx@lists.osr.com
Terribly sorry to mislead people on this one. I was running the wrong test.
RequestorMode MUST be KernelMode, i.e.,
myIrp->RequestorMode = KernelMode
In addition, the other suggestions (leaving OriginalFileName blank, omitting
IRP_DEFER_IO_COMPLETION) had no affect either. The only thing that worked was
omitting IRP_NOCACHE.
So we are back to the original problem: why does specifying IRP_NOCACHE chew
up resources in 2003 Server on an embedded read.
Neil
----- Original Message -----
From: “Neil Weicher”
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 05, 2004 10:16 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
> Ok, I am sure this will be helpful to a lot of other people, too: the
> suggestion that appeared to do the trick is using the original
> RequestorMode, i.e., I changed:
> myIrp->RequestorMode = KernelMode
> to
> myIrp->RequestorMode = Irp->RequestorMode
>
> I am glad that it seemed to fix the problem. Even more, I’d appreciate
> understanding the dynamics, and why only 2003 server seemed to care.
Anybody?
Any chance we can get your binary?
A long shot as well: Is irp->MdlAddress NULL after your IRP completes?
Neil Weicher wrote:
Terribly sorry to mislead people on this one. I was running the wrong test.
RequestorMode MUST be KernelMode, i.e.,
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Irp->RequestorMode is used in the FSDs in the following way: if it is
UserMode, then the buffer pointer is validated to be user mode pointer.
Otherwise, no validation is done.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Neil Weicher”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, July 06, 2004 12:09 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
> Terribly sorry to mislead people on this one. I was running the wrong test.
> RequestorMode MUST be KernelMode, i.e.,
>
> myIrp->RequestorMode = KernelMode
>
> In addition, the other suggestions (leaving OriginalFileName blank, omitting
> IRP_DEFER_IO_COMPLETION) had no affect either. The only thing that worked
was
> omitting IRP_NOCACHE.
>
> So we are back to the original problem: why does specifying IRP_NOCACHE chew
> up resources in 2003 Server on an embedded read.
>
> Neil
>
> ----- Original Message -----
> From: “Neil Weicher”
> To: “Windows File Systems Devs Interest List”
> Sent: Monday, July 05, 2004 10:16 AM
> Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
>
>
> > Ok, I am sure this will be helpful to a lot of other people, too: the
> > suggestion that appeared to do the trick is using the original
> > RequestorMode, i.e., I changed:
> > myIrp->RequestorMode = KernelMode
> > to
> > myIrp->RequestorMode = Irp->RequestorMode
> >
> > I am glad that it seemed to fix the problem. Even more, I’d appreciate
> > understanding the dynamics, and why only 2003 server seemed to care.
> Anybody?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Thanks Maxim - any idea why specifying IRP_NOCACHE eats up resources in
Windows 2003 Server? - Neil
----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 05, 2004 4:24 PM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Irp->RequestorMode is used in the FSDs in the following way: if it is
UserMode, then the buffer pointer is validated to be user mode pointer.
Otherwise, no validation is done.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Neil Weicher”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, July 06, 2004 12:09 AM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
> Terribly sorry to mislead people on this one. I was running the wrong test.
> RequestorMode MUST be KernelMode, i.e.,
>
> myIrp->RequestorMode = KernelMode
>
> In addition, the other suggestions (leaving OriginalFileName blank, omitting
> IRP_DEFER_IO_COMPLETION) had no affect either. The only thing that worked
was
> omitting IRP_NOCACHE.
>
> So we are back to the original problem: why does specifying IRP_NOCACHE chew
> up resources in 2003 Server on an embedded read.
>
> Neil
>
> ----- Original Message -----
> From: “Neil Weicher”
> To: “Windows File Systems Devs Interest List”
> Sent: Monday, July 05, 2004 10:16 AM
> Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
>
>
> > Ok, I am sure this will be helpful to a lot of other people, too: the
> > suggestion that appeared to do the trick is using the original
> > RequestorMode, i.e., I changed:
> > myIrp->RequestorMode = KernelMode
> > to
> > myIrp->RequestorMode = Irp->RequestorMode
> >
> > I am glad that it seemed to fix the problem. Even more, I’d appreciate
> > understanding the dynamics, and why only 2003 server seemed to care.
> Anybody?
>
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@netlib.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Dejan,
Ok, I finally put together a test program. I created a stripped down driver
that does nothing else than have an embedded read inside a Create completion
routine. It works fine in NT, 2K, and XP, but has problems in 2003.
You can find the driver, a tester program, source code and instructions at
http://64.90.168.133/testme/testme.zip
I’d appreciate your (or anyone’s) feedback as to why it fails in 2003 but
works in 2K, etc. Hopefully it is not something incredibly stupid that works
by pure dumb luck in 2K.
Neil
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 05, 2004 4:17 PM
Subject: Re: [ntfsd] IRP_NOCACHE and Windows 2003 Server
Any chance we can get your binary?
A long shot as well: Is irp->MdlAddress NULL after your IRP completes?
Neil Weicher wrote:
Dejan,
Ok, I finally put together a test program. I created a stripped down driver
that does nothing else than have an embedded read inside a Create completion
routine. It works fine in NT, 2K, and XP, but has problems in 2003.
You can find the driver, a tester program, source code and instructions at
http://64.90.168.133/testme/testme.zip
I’d appreciate your (or anyone’s) feedback as to why it fails in 2003 but
works in 2K, etc. Hopefully it is not something incredibly stupid that works
by pure dumb luck in 2K.
Neil
PS - this might be a duplicate message, sorry it it is
----- Original Message -----
From: “Dejan Maksimovic”
To: “Windows File Systems Devs Interest List”
Sent: Monday, July 05, 2004 4:17 PM
Subject: Re: IRP_NOCACHE and Windows 2003 Server
Any chance we can get your binary?
A long shot as well: Is irp->MdlAddress NULL after your IRP completes?