syncing an inode
by krystalkarma from LinuxQuestions.org on (#52N4E)
Hi everyone,
I'm not sure how the command sync <inode> is supposed to work. Sync must force to write on the disk all cached data.
I tried something with ext2 fs. I copied a file onto a ext2-formatted USB key, and The sync was automatic, I can see the file data written on the disk. I copied a second file, for which data were not synchronized. So I run the sync command on the file, but somehow, there was no synchronization at all. If I unmount however, pending I/O were completed.
I read somewhere that sometimes, sync operations were delayed to a most appropriate time so that the kernel can manage several critical operations.
Can somebody explain me if this behaviour is expected and what happens ?
Thanks.
greetings.


I'm not sure how the command sync <inode> is supposed to work. Sync must force to write on the disk all cached data.
I tried something with ext2 fs. I copied a file onto a ext2-formatted USB key, and The sync was automatic, I can see the file data written on the disk. I copied a second file, for which data were not synchronized. So I run the sync command on the file, but somehow, there was no synchronization at all. If I unmount however, pending I/O were completed.
I read somewhere that sometimes, sync operations were delayed to a most appropriate time so that the kernel can manage several critical operations.
Can somebody explain me if this behaviour is expected and what happens ?
Thanks.
greetings.