On 9/16/19 9:33 AM, Daegyu Han wrote: > Hi linux file system experts, > > I want to share ext4 on the storage server to multiple initiators(node > A,B) using NVMeoF. > Node A will write file to ext4 on the storage server, and I will mount > read-only option on Node B. > > Actually, the reason I do this is for a prototype test. > > I can't see the file's dentry and inode written in Node A on Node B > unless remount(umount and then mount) it. > > Why is that? Caching, metadata journaling, etc. What you are trying to do will not work. > I think if there is file system cache(dentry, inode) on Node B, then > disk IO will occur to read the data written by Node A. why would it? there is no coordination between the nodes. ext4 is not a clustered filesystem. > Curiously, drop cache on Node B and do blockdev --flushbufs, then I > can access the file written by Node A. > > I checked the kernel code and found that flushbufs incurs > sync_filesystem() which flushes the superblock and all dirty file > system caches. > > Should the superblock data structure be flushed (updated) when > accessing the disk inode? It has nothing to do w/ the superblock. > I wonder why this happens. ext4 cannot be used for what you're trying to do. -Eric