On 16/11/2024 20:13, Rich Freeman wrote:
Well, drive-managed SMR drives typically have CMR regions for data caching, and they could also be used to store the bitmap. Cheap drives might not support trim at all, and would just preserve all data on write. After all, it isn't performance that is driving the decision to sneak SMR into consumer drives. Flash would be the most sensible way to do it though.
I would have thought the best way for a host-managed drive to avoid masses of read-write would simply be to stream the data (files) to an SMR region, and the metadata (directory structure) to SMR.
That way, if you store the block list in the directory, you just drop data blocks, and if you keep track of which directory contents are stored in which SMR block, you can simply recover the space by copying the directory(ies) to a new block.
Cheers, Wol