Assume several 1000's of files are copied in the same directory on an SSD. In such cases, the concerned part of the filesystem area must be updated after each newly created file, and it is highly probable this modifications will affect the same physical block (up to a limit). Now, the SSD itself has no idea whether a block holds filesystem information or something else, so it does not make sure on the firmware level that filesystem blocks are held in the SSD's cache. So my question is: is there an OS level caching mechanism on the blocks holding the filesystem itself? I'm specifically curious about how Linux/ext4 handles this (there is many information available about how caching of files written to block devices is done, but it is unclear how the blocks of the filesystem area itself are cached, if they are at all). I guess, they must be committed after each filesystem change, but in this case it would impose a huge extra wear on the blocks of the filesystem area in the above use case.
Asked
Active
Viewed 145 times