Why does USB drives, MicroSD cards and so on get corrupted?
And most of all, when they get corrupted, why does the storage support becomes read-only?
This concept seems to me really wierd, lol.
Cheers.
Writing, yes but reading?W. H. Heydt wrote: ↑Fri Nov 02, 2018 1:06 am... As a result, if you read part of a block, the internal processor reads the whole block to some temporary storage and writes it back...somewhere else. If you write part of a block, the device reads the whole block, updates the part you're writing and writes it all back out to flash...somewhere else.
I am not convinced that's right, that any SD card is deliberately forcing itself permanently read only or that any Linux or other system would instruct it to go permanently read only when it determined file system corruption was present.W. H. Heydt wrote: ↑Fri Nov 02, 2018 1:06 amGoing to "read only" is simply a method of allowing you to retrieve any data that can be retrieved without taking the risk of doing more rewrite actions and making the corruption worse.
Generally it doesn't but it can happen that constantly reading a cell can alter an adjacent cell in the same block. Some controllers may keep tabs on how many times a block has been read since last written and decide to move it. Also this helps where, for example if 90% of the memory is used but only read from. Without moving the read only blocks would mean 10% of the memory is always used for writing, that would wear out quickly whilst the rest of the memory would still be good for a lot more cycles. Moving a block that is normally only read from to a block which is running low on usable write cycles gives you a longer working life.Burngate wrote: ↑Fri Nov 02, 2018 10:09 amWriting, yes but reading?W. H. Heydt wrote: ↑Fri Nov 02, 2018 1:06 am... As a result, if you read part of a block, the internal processor reads the whole block to some temporary storage and writes it back...somewhere else. If you write part of a block, the device reads the whole block, updates the part you're writing and writes it all back out to flash...somewhere else.
If it's only reading, and nothing's changed, why should it write it back ... somewhere else?
I agree that a Linux system won't do that. *nix systems will simply throw errors and suggest running fsck to try fix the file system.hippy wrote: ↑Fri Nov 02, 2018 2:32 pmI am not convinced that's right, that any SD card is deliberately forcing itself permanently read only or that any Linux or other system would instruct it to go permanently read only when it determined file system corruption was present.W. H. Heydt wrote: ↑Fri Nov 02, 2018 1:06 amGoing to "read only" is simply a method of allowing you to retrieve any data that can be retrieved without taking the risk of doing more rewrite actions and making the corruption worse.