3 ms·
For point 2, you can't just expose a smaller block to the next layer - everything is designed to work with 512-byte logical blocks. You could possibly do it if
by caf 11y ago
For point 2, you can't just expose a smaller block to the next layer - everything is designed to work with 512-byte logical blocks. You could possibly do it if you were willing to sacrifice half your disk space by pairing every 512-byte data block with a 512-byte authenticator block, but...
...the other issue is that you need a way to atomically update the data block and authenticator together. This is a similar problem to the "RAID write hole", and doing this at the block layer requires even more overhead - something equivalent to RAID write intent bitmaps.
The filesystem, on the other hand, already tends to have a journal, log-structure or COW rules that allows some form of atomic transactional updates. The encryption authenticator can piggy-back on this.
- Dylan16807 11y agoWell if you use atomic 4K writes to the drive, and expose each one as 7 512-byte blocks to the next layer...
- kijin 11y agoThat's exactly what I was thinking. SSDs have fairly large page sizes and erase block sizes, so you're often reading and writing a lot more than necessary, anyway. A clever implementation might be able to take advantage of that to scatter the MAC throughout the drive without too much impact on performance or longevity.
- caf 11y agoNow your 4K aligned writes of filesystem blocks turn into an 8K read-modify-write cycle on the underlying block device.