Abstract:Recently, many new persistent in-memory file systems are proposed to exploit the advantages of non-volatile memory (NVM), such as low latency and byte-addressability. As a result, the performance of the persistent in-memory file systems is greatly improved by optimizing the I/O stack and data consistency mechanisms. Nevertheless, existing persistent in-memory file systems ignores the limited write endurance of NVM, which can easily lead to the wear out of NVM. This study first explores wear attacks using the common file system operations to wear out the underlying NVM devices of persistent in-memory file systems. The effectiveness of the wear attacks is proved by experiments in PMFS, a real persistent in-memory file system. Then, in order to prevent NVM from malicious wear attacks, this study proposes a persistent in-memory file system wear defense (PFWD) strategy, which includes inode virtualization, super block migration, data page wear-leveling, and file index structure migration, to protect all the data structures of file systems that may be exploited by wear attacks. Experimental results show that PFWD can effectively prevent NVM from wear attacks and improve the stability of the storage system.