|
|
Subscribe / Log in / New account

How does this work at a physical level?

How does this work at a physical level?

Posted Feb 23, 2025 7:25 UTC (Sun) by KJ7RRV (subscriber, #153595)
In reply to: How does this work at a physical level? by Cyberax
Parent article: Support for atomic block writes in 6.13

That makes sense; thank you! So the drive has to be built with a capacitor to enable this feature?


to post comments

How does this work at a physical level?

Posted Feb 23, 2025 13:01 UTC (Sun) by farnz (subscriber, #17727) [Link] (2 responses)

It doesn't need a capacitor, necessarily. There's two routes you can take in an SSD to enable this feature:
  1. Have a capacitor or other energy store on the device, so that when power is lost, you can complete all the writes before the energy store drains.
  2. Use the FTL's block mapping to allow you to atomically switch in a new mapping with a single bit write, and do not return that the command is complete until the new mapping is switched in. Then, you can write the new data and associated mapping, followed by the single bit write to switch the mapping over. If that bit write succeeds, the swap over is done; if it doesn't, the swap fails to happen.

Capacitor is more likely, because it lets you have a write cache, too, and thus a performance advantage in enterprise drives. But it's possible without one in an SSD.

How does this work at a physical level?

Posted Feb 24, 2025 1:32 UTC (Mon) by Paf (subscriber, #91811) [Link] (1 responses)

"Use the FTL's block mapping to allow you to atomically switch in a new mapping with a single bit write, and do not return that the command is complete until the new mapping is switched in. Then, you can write the new data and associated mapping, followed by the single bit write to switch the mapping over. If that bit write succeeds, the swap over is done; if it doesn't, the swap fails to happen."

I like that this is basically double writes - sometimes, it's turtles all the way down.

How does this work at a physical level?

Posted Mar 3, 2025 17:09 UTC (Mon) by mebrown (subscriber, #7960) [Link]

No, it's not a double write.

The new data is written to a new block, then the mapping table entry is atomically switched so that the old data is unmapped/freed and the new data is swapped in.

How does this work at a physical level?

Posted Feb 23, 2025 13:50 UTC (Sun) by kleptog (subscriber, #1183) [Link]

For non-SSDs you have hardware RAID controllers with a battery-backed memory that will hold the blocks waiting to be written and if the power fails it will keep the data and write it out when the power comes back.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds