I am currently doing a comparison of fsync vs fdatasync in linux, to see how much more data is written to the disk in fsync.
I have tried using iotops and checked /proc//io file to check if it indicated any data written more than the writes issued.
I wrote 8KB block and flushed using fsync, and repeated this 1000 times. Thus total data written by the process should be 8192,000 bytes + the meta data of the file, which should be updated during flush (fsync).
But with both of the above methods (iotops and /proc/pid/io), i got exactly 8192000 as output for data written, which doesn't account for how much meta data is written by the file.
Could anyone please tell how to measure the amount of meta data that has been written by the process?