GNU bug report logs - #7420
[Feature request]: add option to dd to fsync|fdatasync after each block written

Previous Next

Package: coreutils;

Reported by: Марк Коренберг <socketpair <at> gmail.com>

Date: Wed, 17 Nov 2010 11:47:02 UTC

Severity: wishlist

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 7420 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Марк Коренберг
 <socketpair <at> gmail.com>, 7420 <at> debbugs.gnu.org
Subject: Re: bug#7420: [Feature request]: add option to dd to fsync|fdatasync
 after each block written
Date: Sun, 25 Jan 2015 17:51:45 +0000
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.




This bug report was last modified 10 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.