I am currently having problems performing an asynchronous low level non
cached io read from my device using IoCallDriver(…)
if I fill the next stack frame in the Irp to issue a IRP_MJ_READ using the
following parameters…
IoSetCompletionRoutine( … );
IrpSp = IoGetNextIrpStackLocation( Irp );
IrpSp->MajorFunction = IRP_MJ_READ;
IrpSp->Parameters.Read.Length = 0x1C0; //(448 bytes)
IrpSp->Parameters.Read.ByteOffset.QuadPart = 512;
Then I IoCallDriver returns STATUS_INVALID_PARAMETER… however if I change
the read length to 512, I dont have any problems reading from the device…
does this mean I am restricted to reading multiple blocks of 512 bytes from
the device at a time?
General Dynamics United Kingdom Limited
Registered in England and Wales No. 1911653
Registered Office: 100 New Bridge Street, London, EC4V 6JA
For files opened with non intermendiate buffering IO must be in size of
multiples of sector size.
Dan
----- Original Message -----
From: “James Dunning”
To: “File Systems Developers”
Sent: Thursday, August 29, 2002 12:20 PM
Subject: [ntfsd] Problems reading data from a device asynchronously…
> I am currently having problems performing an asynchronous low level non
> cached io read from my device using IoCallDriver(…)
>
> if I fill the next stack frame in the Irp to issue a IRP_MJ_READ using the
> following parameters…
>
> IoSetCompletionRoutine( … );
>
> IrpSp = IoGetNextIrpStackLocation( Irp );
>
> IrpSp->MajorFunction = IRP_MJ_READ;
> IrpSp->Parameters.Read.Length = 0x1C0; //(448 bytes)
> IrpSp->Parameters.Read.ByteOffset.QuadPart = 512;
>
> Then I IoCallDriver returns STATUS_INVALID_PARAMETER… however if I
change
> the read length to 512, I dont have any problems reading from the device…
> does this mean I am restricted to reading multiple blocks of 512 bytes
from
> the device at a time?
>
>
>
>
>
>
>
>
> General Dynamics United Kingdom Limited
> Registered in England and Wales No. 1911653
> Registered Office: 100 New Bridge Street, London, EC4V 6JA
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>
Length of the non-cached IO read/write must be an integer multiple of a
sector size.
So if the sector size of a device (DeviceObject->SectorSize) is 512,
you can read 512, 1024, 1536, etc. bytes, but not for example 768.
The same rule applies to the starting byte, of course ;-))).
Paul
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Dunning
Sent: Thursday, August 29, 2002 11:20 AM
To: File Systems Developers
Subject: [ntfsd] Problems reading data from a device asynchronously…
I am currently having problems performing an asynchronous low level non
cached io read from my device using IoCallDriver(…)
if I fill the next stack frame in the Irp to issue a IRP_MJ_READ using
the following parameters…
IoSetCompletionRoutine( … );
IrpSp = IoGetNextIrpStackLocation( Irp );
IrpSp->MajorFunction = IRP_MJ_READ;
IrpSp->Parameters.Read.Length = 0x1C0; //(448 bytes)
IrpSp->Parameters.Read.ByteOffset.QuadPart = 512;
Then I IoCallDriver returns STATUS_INVALID_PARAMETER… however if I
change the read length to 512, I dont have any problems reading from the
device… does this mean I am restricted to reading multiple blocks of
512 bytes from the device at a time?
General Dynamics United Kingdom Limited
Registered in England and Wales No. 1911653
Registered Office: 100 New Bridge Street, London, EC4V 6JA
You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to %%email.unsub%%