I am a graduate student researcher at Stony Brook University. Our team is working on applying model checking to detect file system bugs in the Linux kernel. The problem now is that we need to restore a file system's previous state, including on-disk (persistent) and in-memory (in-kernel) states. However, the in-memory states (e.g., page cache, kernel memory) are not easily saved and restored. We investigated virtual-machine snapshotting, but VM snapshot is slow. Then we plan to implement our own customized checkpoint/restore API for kernel file systems via unlocked_ioctl. Checkpoint API copies important filesystem data structures in VFS (e.g., super_block, inode, dentry, file), while restore API replaces the current data structures with the copied version. I want to ask if this objective is feasible. Basically, we hope to implement a file system snapshot to save and restore all the file system states using ioctl. The concern is that structures like inode and dentry are interconnected with other kernel components, which might cause inconsistent kernel states after restoration. Any ideas or thoughts? Thank you! Best Regards, Yifei