bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7420: [Feature request]: add option to dd to fsync|fdatasync after e


From: Pádraig Brady
Subject: bug#7420: [Feature request]: add option to dd to fsync|fdatasync after each block written
Date: Sun, 25 Jan 2015 17:51:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

unarchive 7420
tag 7420 notabug
close 7420
stop

On 17/11/10 10:19, Марк Коренберг wrote:
> [Feature request]: add option to dd to fsync|fdatasync after each block 
> written
> 
> Suppose I want to show progress with:
> 
> pv image.img | dd bs=16M of=/dev/sdc
> 
> it will not work, as dd will write to sdc momentarily. dd will hang on
> close(1) waiting for actual write to complete (tested on USB stick
> Linux 2.6.32)
> 
> I decide to use  oflag=direct. It help, OK. But: 
> http://kerneltrap.org/node/7563
> 
> It will be nice if, dd will be able to fsync/fdatasync after each block.
> 
> I think, it is useful for other usages.

This is useful.
However supporting functionality was added to the next kernel version 2.6.33
Or rather O_SYNC ad O_DSYNC were properly distinguished: 
http://lwn.net/Articles/350225/
Both options were available to through dd long before that.
In summary dd oflag=dsync should now do exactly as you expect.

thanks,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]