David Wright <deb...@lionunicorn.co.uk> writes: > On Tue 10 Sep 2024 at 11:56:25 (+0300), Anssi Saari wrote:
>> Why do you think that? Which part of the fsync manpage explicitly covers >> fsync's effect on device files? Share share, it's fair. > “fsync() transfers ("flushes") all modified in-core data of (i.e., > modified buffer cache pages for) the file referred to by the file > descriptor fd to the disk device (or other permanent storage device) > so that all changed information can be retrieved even after the > system crashed or was rebooted. This includes writing through or > flushing a disk cache if present. The call blocks until the device > reports that the transfer has completed. It also flushes metadata > information associated with the file (see stat(2)).” You just parroted a man page I had already read. Why did you think that'd be helpful? I asked the questions because the man page didn't answer my questions. As you are apparemntly unable I found for example https://unix.stackexchange.com/questions/473854/block-device-cache-v-s-a-filesystem and so arrived to the conclusion that the final close(2) call on a block device already flushes all buffers before returning. So the answer to the question "is running sync needed after dd to block device" is no. Someone else posted that too on this list recently, in another thread.