If I create a file, such as /tmp/vdev (400KB in size and formatted to ext4) then map it to /dev/loop18, and then mount the /dev/loop18 to /tmp/mnt, and then create a text file under /tmp/mnt and write various phrases to it while keeping /tmp/vdev & /dev/loop18 each open in a separate hex editor, then I notice /tmp/vdev always updates in real-time when I save the text file. But /dev/loop18 always shows old content from the last mount operation, and doesn't update until I unmount it. This is the case irrespective if I mount it with -o sync or not. Is there a reason for this, and how can I force /dev/loop18 to update in real-time (on actual modifications to disk such as a save operation)?
Asked
Active
Viewed 30 times
1
mo FEAR
- 192
-
you can drop cache, see also https://unix.stackexchange.com/a/760335/30851 – frostschutz Dec 27 '23 at 07:36