[pso] [tema3 windows] Intrebari
Florin Antonescu
florinantonescu at yahoo.com
Thu May 8 17:52:20 EEST 2008
1. i = 16, Length = 512
Am observat ca desi in driverEntry pun device->Flags |= DO_BUFFERED_IO, irp-ul pe care il primesc in functia de write are urmatoarele flaguri setate.
Din asta eu inteleg ca nu se lucreaza buffered; sau inteleg eu gresit? Ce gresesc? Sau cumva nu se poate lucra buffered?
IRP_NOCACHE
NO IRP_PAGING_IO!
NO IRP_MOUNT_COMPLETION!
NO IRP_SYNCHRONOUS_API!
NO IRP_ASSOCIATED_IRP!
NO BUFFERD_IO!
NO IRP_DEALLOCATE_BUFFER!
NO IRP_INPUT_OPERATION!
NO IRP_SYNCHRONOUS_PAGING_IO!
NO IRP_CREATE_OPERATION!
NO IRP_READ_OPERATION!
IRP_WRITE_OPERATION
NO IRP_CLOSE_OPERATION!
IRP_DEFER_IO_COMPLETION
Alexandru Florian Antonescu
----- Original Message ----
From: Razvan Deaconescu <razvand at cs.pub.ro>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Thursday, May 8, 2008 4:44:32 PM
Subject: Re: [pso] [tema3 windows] Intrebari
On Thu, 2008-05-08 at 00:31 -0700, Florin Antonescu wrote:
> As avea cateva intrebari legate de tema3, mentionez ca operatiile le
> fac BUFFERD_IO:
> 1. este normal ca atunci cand incerc sa afisez continutul lui
> irp->AssociatedIrp.SystemBuffer (DbgPrint("%c ",
> ((char*)irp->AssociatedIrp.SystemBuffer)[i]);) sa imi dea blue screen?
Blue screen cu ce mesaj? Explicatia lui Marius pare plauzibila.
> 2. campul ByteOffset din IO_STACK_LOCATION in cazul unui write/read
> este echivalent cu bi_sector din Linux sau este pozitia de inceput din
> SystemBuffer?
Este pozitia in cadrul discului (masurata in octeti, nu in sectoare).
> 3. am incercat sa duplic IRP-ul de write prin apelarea de doua ori a
> IoBuildSynchronousFsdRequest caruia i-am dat ca parametii campurile
> din IRP-ul primit (irp->AssociatedIrp.SystemBuffer, Length,
> ByteOffset), dupa care am apelat IoCallDriver, KeWaitForSingleObject
> si IoCompleteRequest. In test apare o eroare (WriteFile returneaza
> false, eroare este 1450) si dupa un scurt timp apare blue screen cu
> mesajul: DRIVER LEFT LOCKED PAGES IN MEMORY. Ce gresesc?
Trebuie sa dai o copie a buffer-ului, nu buffer-ul IRP-ului original.
Razvan
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
pso mailing list
pso at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080508/c4e47887/attachment.htm
More information about the pso
mailing list