[pso] [tema3] scriere crc

Octavian Voicu octavian.voicu at gmail.com
Wed May 20 19:30:37 EEST 2009


Ca sa retrimiti un bio cu care ai citit ceva pentru a scrie inapoi, trebuie
sa faci urmatoarele:

bio->bi_sector = original_sector;
bio->bi_size = PAGE_SIZE * bio->bi_vcnt;
submit_bio(WRITE, bio);

Trebuie sa setezi bi_sector si bi_size la valoarea din bio-ului initial
(bi_sector este incrementata automat cu cate sectoare s-au citit si bi_size
este setat la 0). Mai sus am calculat size-ul ca dimensiunea paginii * nr
segmente; daca nu toate segmentele au dimensiunea unei pagini trebuie sa il
calculezi altfel.


2009/5/20 Bogdan Tenea <tenea.bogdan at gmail.com>

> Intampin urmatoarea difcultate: la scriere fac doua biouri pentru a citi
> CRCul de pe hard, modific crcul sectoarelelor care se scriu pe hard, dar
> dupa ce schimb directia bioului ca sa-l scriu incepe sa se blocheze cateva
> secunde bune dupa da niste erori (nu da oops sau panic). Practic merge sa
> fac submit bio, dar ramane blocat la evenimentul bioului respectiv. Am
> incercat si sa clonez biourile inainte de scriere, sa folosesc bio_endio pe
> cele initiale si sa folosesc alte 2 evenimente decat cele initiale, dar nici
> un rezultat, mereu acceasi eroare.
>
> May 20 18:04:18 faust kernel: hdb: dma_timer_expiry: DMA status (0x66)
> May 20 18:04:18 faust kernel: hdd: dma_timer_expiry: DMA status (0x66)
> May 20 18:04:18 faust kernel: hdb: DMA interrupt recovery
> May 20 18:04:18 faust kernel: hdb: lost interrupt
> May 20 18:04:18 faust kernel: hdb: dma_intr: status=0x51 { DriveReady
> SeekComplete Error }
> May 20 18:04:18 faust kernel: hdb: dma_intr: error=0xc0 { BadSector
> UncorrectableError }, LBAsect=196081, sector=196081
> May 20 18:04:18 faust kernel: ide: failed opcode was: unknown
> May 20 18:04:18 faust kernel: end_request: I/O error, dev hdb, sector
> 196081
> May 20 18:04:18 faust kernel: hdd: DMA interrupt recovery
> May 20 18:04:18 faust kernel: hdd: lost interrupt
> May 20 18:04:18 faust kernel: hdd: dma_intr: status=0x51 { DriveReady
> SeekComplete Error }
> May 20 18:04:18 faust kernel: hdd: dma_intr: error=0xc0 { BadSector
> UncorrectableError }, LBAsect=196081, sector=196081
> May 20 18:04:18 faust kernel: ide: failed opcode was: unknown
> May 20 18:04:18 faust kernel: end_request: I/O error, dev hdd, sector
> 196081
>
> Multumesc,
> Bogdan
>
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>


-- 
Octavian Voicu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/pso/attachments/20090520/e997a4e5/attachment.htm>


More information about the pso mailing list