Daniel,
>>> If you leave parts unpartitioned but still containing data from
>>> the last time it was used, the SSD is still contractually obliged
>>> to keep the data in case you need it another time
>>
>> That doesn't make any sense. The data in blocks not part of any
>> partition (or file!) needs to be kept ? For what reason ?
>
> It's complicated.
A couple of days back I wrote that I confused myself by going with the
notion that what the OS puts on the disk (partitions or other) has got a
connection with the wear-leveling the SSD does. The moment I realized that
that isn't the case the whole story got rather simple.
> It also keeps a record of which blocks contain data and which do not.
That, it cannot do. It can keep track of blocks that are in their erased
state though - which can still be part of a file (or partition).
> [The situation is further complicated by the fact that the logical and
> physical blocks are different sizes, and that physical blocks may not
> be erasable individually -- but I'm ignoring that for simplicity.]
Read/write block size versus erase-block size. Got it.
> A block contains data if it has ever been written to, unless it
> has since been identified as unused using the TRIM command.
... or, I assume, when it has been written to with a pattern that equals its
erased state (iow, didn't get a write cycle after it got erased).
> The controller doesn't know anything about filesystems or partitioning.
Yeah, in my initial reply I forgot all about that. :-(
> So, it's not that there is any reason to keep the data in those blocks,
> just that there is no way to tell that there is no reason.
:-) I realized that, no way to tell, too.
>> Again, I do not understand. The blocks in the unpartitioned area might
>> be zeroed out, but the moment the wear-leveling mechanism swaps such a
>> block out with one inside a partition that swapped-out block now in the
>> unpartitioned area is going to contain data.
That question solved itself when I realized that I had mixed two fully
seperate processes up as one.
Every logical block - to the wear-leveling process - needs to keep the data
as it has been written to. Even after "swapping" the physical blocks
carrying the data.
> When a block is written the controller will select the least-used
> free block available,
:-) When I thought about how the wear-leveling algorithm could work that
was also what I arrived at.
... though you mentioned that the drive remembers the blocks that do not
carry any data.
As there must be a reason for it I assume that the wear-leveling algorithm
is a bit more complex than that. :-)
Thanks for the explanation.
Regards,
Rudy Wieser