Salut,

 Poate este un Usb Mass Storage Device mai special. Vezi comentariile
de mai jos.

On 10/16/07, Teodor Robas <[EMAIL PROTECTED]> wrote:
>
> Flash-ul e de 1 GB fara doar si poate (il am de aproape 2 ani).
> Problema a aparut imediat dupa ce am folosit drive-ul nou de 8 GB, si
> presupun ca driverul e de vina.

Driverul sau chiar stick-ul

> Din cate stiu eu drive-urile astea au niste algoritmi pentru optimizarea
> utilizarii celulelor de memorie,
> astfel incat scrierea unui fisier se face fizic oriunde in memorie unde s-a
> scris de cele mai putine ori.
> Asta explica de ce atunci cand aveam o partitie de 1GB+free space fisierele
> scrise nu erau identice cu
>  originalul.

Aproape. O mica vizita pe wikipedia iti da urmatoarele informatii:

NAND flash architecture was introduced by Toshiba in 1989. NAND flash
memories cannot provide execute in place due to their different
construction principles. These memories are accessed much like block
devices such as hard disks or memory cards. The pages are typically
512 or 2,048 bytes in size. Associated with each page are a few bytes
(typically 12–16 bytes) that should be used for storage of an error
detection and correction checksum.

The error-correcting and detecting checksum will typically correct an
error where one bit per 256 bytes (2,048 bits) is incorrect. When this
happens, the block is marked bad in a logical block allocation table,
and its undamaged contents are copied to a new block and the logical
block allocation table is altered accordingly.

> ambele calculatoare pe care am folosit stick-ul. Deseara o sa incerc si un
> 2.6.21 pe un alt sistem. Totusi
> am senzatia ca size-ul actual e scris in flash, si probabil va trebui sa fac
> cumva sa am access la setarile
> din flash.

Ai dreptate, daca te uiti in sursele kernelului in
$KERNSRC/drivers/usb/storage/scsiglue.c o sa gasesti
urmatoare remarca:

/* A few disks have two indistinguishable version, one of
                 * which reports the correct capacity and the other does not.
                 * The sd driver has to guess which is the case. */

:)

Poate te ajuta un pic de hacking in kernel prin analizarea celor doua
versiuni sa vezi ce capacitate raporteaza.



-- 
Marian Neagul
Blog: http://blog.segfault.ro
Phone: +40 729 952 861
_______________________________________________
tmlug mailing list
[email protected]
http://lists.tmlug.ro/cgi-bin/mailman/listinfo/tmlug

Raspunde prin e-mail lui