On Wed, Oct 02, 2019 at 11:42:47PM +0900, Daegyu Han wrote: > Thank you for your consideration. > > Okay, I will check ocfs2 out. > > By the way, is there any possibility to implement this functionality > in the vfs layer? > > I looked at the dcache.c, inode.c, and mm/vmscan.c code and looked at > several functions, > and as you said, they seem to have way complex logic. > > The logic I thought was to release the desired dentry, dentry_kill() > the negative dentry, and break the inodes of the file that had that > dentry. The short version is that objects have dependencies on other objects. For example, a file descriptor object has a reference to the dentry of the file which is open. A file dentry or directory dentry object references its parent directory's dentry object, etc. You can not evict an object when other objects have references on it --- otherwise those references become dangling pointers, Which Would Be Bad. There are solutions for remote file systems (network, clustered, and shared disk file systems). So the VFS layer can support these file systems quite well. Look at ceph, nfs, ofs2, and gfs for examples for that. But it's *complicated* because doing it in a way which is highly performant, both for remote file systems, and as well as supporting high-performance local disk file systems, is a lot more than your very simple-minded, "just kill the dentry/inode structures and reread them from disk". Are you trying to do this for a university class project or some such? If so, we're not here to do your homework for you. If you want a practical solution, please use an existing shared-disk or networked file system. Best regards, - Ted