Can anyone (preferably MS folks) tell me what the APCSynchRW test
(from ifstest in HCT) does?
It’s the only thing my filter is failing (except for open by ID,
which I have to deny, for security purposes), and I don’t know what it
does - the link that is supposed to tell about the test does not work.
(The link to microsoft.com website after the test)
–
Kind regards, Dejan M. 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.
The description of this test is in the HCT docs, chapter 21, TD-21.15:
“The read and write functions can perform asynchronous IO using APC. If
an operation cannot proceed immediately, for example a file object
cannot be locked for exclusive access because another thread has the
lock, the calls will return a status pending. If an APC is specified,
that call will be made when the IO completes. A test file is opened with
an asynchronous file handle. A write operation is performed on the test
file, with an APC routine being specified for the write. The APC will
set the event when the write completes. This completion is waited upon
in the main thread. This test is repeated for the read operation.”
Are you handling STATUS_PENDING correctly in your read/write dispatch?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Saturday, March 01, 2003 9:50 PM
To: File Systems Developers
Subject: [ntfsd] APCSynchRW test
Can anyone (preferably MS folks) tell me what the
APCSynchRW test (from ifstest in HCT) does?
It’s the only thing my filter is failing (except for open
by ID, which I have to deny, for security purposes), and I
don’t know what it does - the link that is supposed to tell
about the test does not work. (The link to microsoft.com
website after the test)
–
Kind regards, Dejan M. 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.
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
> The description of this test is in the HCT docs, chapter 21, TD-21.15:
“The read and write functions can perform asynchronous IO using APC. If an
operation cannot proceed immediately, for example a file object cannot be
locked for exclusive access because another thread has the lock, the calls
will return a status pending. If an APC is specified, that call will be
made when the IO completes. A test file is opened with an asynchronous
file handle. A write operation is performed on the test file, with an APC
routine being specified for the write. The APC will set the event when the
write completes. This completion is waited upon in the main thread. This
test is repeated for the read operation.”
I need to learn how to search:-)
Are you handling STATUS_PENDING correctly in your read/write dispatch?
No - I just call IoSkip… IoCallDriver.
–
Kind regards, Dejan M. 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.
What puzzles me with many tests is that they sometimes succeed, and
sometimes they don’t - in same conditions (all except date/time:-)
The error I get is a time-out waiting for the event - should I write it
off as a performance issue, or go deeper? The read/write routines do nothing
except IoSkipCurrentIrpStackLocation and IoCallDriver (after doing basic
checks).
Nicholas Ryan wrote:
The description of this test is in the HCT docs, chapter 21, TD-21.15:
“The read and write functions can perform asynchronous IO using APC. If
an operation cannot proceed immediately, for example a file object
cannot be locked for exclusive access because another thread has the
lock, the calls will return a status pending. If an APC is specified,
that call will be made when the IO completes. A test file is opened with
an asynchronous file handle. A write operation is performed on the test
file, with an APC routine being specified for the write. The APC will
set the event when the write completes. This completion is waited upon
in the main thread. This test is repeated for the read operation.”
Are you handling STATUS_PENDING correctly in your read/write dispatch?
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
> Sent: Saturday, March 01, 2003 9:50 PM
> To: File Systems Developers
> Subject: [ntfsd] APCSynchRW test
>
>
>
> Can anyone (preferably MS folks) tell me what the
> APCSynchRW test (from ifstest in HCT) does?
> It’s the only thing my filter is failing (except for open
> by ID, which I have to deny, for security purposes), and I
> don’t know what it does - the link that is supposed to tell
> about the test does not work. (The link to microsoft.com
> website after the test)
>
> –
> Kind regards, Dejan M. 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.
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Kind regards, Dejan M. 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’re just passing down the read/write request (a la FileSpy) I
don’t see where the problem is - could you post a sanitized version of
your dispatch routine? Could your read/write fast I/O routines be a
problem here?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dejan Maksimovic
Sent: Sunday, March 02, 2003 1:45 PM
To: File Systems Developers
Subject: [ntfsd] RE: APCSynchRW test
What puzzles me with many tests is that they sometimes
succeed, and sometimes they don’t - in same conditions (all
except date/time:-)
The error I get is a time-out waiting for the event -
should I write it off as a performance issue, or go deeper?
The read/write routines do nothing except
IoSkipCurrentIrpStackLocation and IoCallDriver (after doing
basic checks).
Nicholas Ryan wrote:
> The description of this test is in the HCT docs, chapter
21, TD-21.15:
>
> “The read and write functions can perform asynchronous IO
using APC.
> If an operation cannot proceed immediately, for example a
file object
> cannot be locked for exclusive access because another
thread has the
> lock, the calls will return a status pending. If an APC is
specified,
> that call will be made when the IO completes. A test file is opened
> with an asynchronous file handle. A write operation is performed on
> the test file, with an APC routine being specified for the
write. The
> APC will set the event when the write completes. This completion is
> waited upon in the main thread. This test is repeated for the read
> operation.”
>
> Are you handling STATUS_PENDING correctly in your
read/write dispatch?
>
> - Nicholas Ryan
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Dejan
> > Maksimovic
> > Sent: Saturday, March 01, 2003 9:50 PM
> > To: File Systems Developers
> > Subject: [ntfsd] APCSynchRW test
> >
> >
> >
> > Can anyone (preferably MS folks) tell me what the APCSynchRW
> > test (from ifstest in HCT) does?
> > It’s the only thing my filter is failing (except for
open by ID,
> > which I have to deny, for security purposes), and I don’t
know what
> > it does - the link that is supposed to tell about the
test does not
> > work. (The link to microsoft.com website after the test)
> >
> > –
> > Kind regards, Dejan M. 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.
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@nryan.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> You are currently subscribed to ntfsd as: xxxxx@alfasp.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Kind regards, Dejan M. 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.
You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
> If you’re just passing down the read/write request (a la FileSpy) I
don’t see where the problem is - could you post a sanitized version of
your dispatch routine?
This is the routine:
if(Irp->Flags & IRP_NOCACHE)
{
goto PagingIo;
}
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(FSDriver, Irp);
PagingIo:
if(!IrpSp->Parameters.Read.Length)
{
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(FSDriver, Irp);
}
if(!lpFileObject ||
!lpFileObject->FsContext)
{
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(FSDriver, Irp);
}
lpEncStruct = ExAllocateFromNPagedLookasideList(&EncStructList);
if(!lpEncStruct)
{
Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_INSUFFICIENT_RESOURCES;
}
lpCoder = AlfaTEGetCipherCode(lpFileObject, lpEncStruct);
switch((DWORD)lpCoder)
{
case 0:
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(FSDriver, Irp);
case (DWORD)ATE_STATUS_NO_MEMORY:
Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_INSUFFICIENT_RESOURCES;
}
// The case 0: will always execute, as no files are encrypted.
Could your read/write fast I/O routines be a problem here?
I doubt it - they are standard pass through ones, SFilter style.
It is important to mention that the problem does not occur all the
time - maybe 50% of it, with a timeout error.
–
Kind regards, Dejan M. 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.