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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7420 in the body.
You can then email your comments to 7420 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7420; Package coreutils. (Wed, 17 Nov 2010 11:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Марк Коренберг <socketpair <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 17 Nov 2010 11:47:02 GMT) Full text and rfc822 format available.

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

From: Марк Коренберг <socketpair <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: [Feature request]: add option to dd to fsync|fdatasync after each
	block written
Date: Wed, 17 Nov 2010 15:19:33 +0500
[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.

-- 
Segmentation fault




Information forwarded to bug-coreutils <at> gnu.org:
bug#7420; Package coreutils. (Sun, 25 Jan 2015 17:52:02 GMT) Full text and rfc822 format available.

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.




Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Sun, 25 Jan 2015 17:52:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7420 <at> debbugs.gnu.org and Марк Коренберг <socketpair <at> gmail.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Sun, 25 Jan 2015 17:52:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Feb 2015 12:24:03 GMT) Full text and rfc822 format available.

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.