> I don't know if this exists or not, but I'd like to try something like a fuse filesystem which can transparently copy a file to a fast scratch SSD when it is first accessed.
You may be interested in checking out bcache[1] or bcachefs[2].
But L2ARC only helps read speed. The idea with dm-writecache is to improve write speed.
I started thinking about this when considering using a SAN for the disks, so that write speed was limited by the 10GbE network I had. A local NVMe could then absorb write bursts, maintaining performance.
That said, it's not something I'd want to use in production that's for sure.
There was some work being done on writeback caching for ZFS[1], sadly it seems to have remained closed-source.
https://github.com/45Drives/autotier is exactly what they were asking for as well