A couple of years ago I did something similar (but not as complete). http://lwn.net/Articles/162776/ I found that having forget/discard as barrier requests can be very bad for performance. At any point when a forget/discard is issued, all data is written to flash which would not have been necessary without the barrier; the dirty blocks could have remained in memory. All of this can be solved through proper merging though. The rules would become fairly difficult, I think. The other issue was that only the in-tree FTL layers could make use of them. CompactFlash ATA does have an "erase sectors" option but this is not really what you want (pre-erase sectors such that the next write will succeed without waiting for a flash erase).
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds