Re: dd conv=fsync

2019-02-15 Thread Ted Unangst
Alexander Bluhm wrote: > We should not implement the magic which device allows fsync(2) into > dd(1). Just do what the user says, if it is nonsense, give him an > error. sure. ok.

Re: dd conv=fsync

2019-02-15 Thread Klemens Nanni
On Fri, Feb 15, 2019 at 01:28:15PM +0100, Alexander Bluhm wrote: > We should not implement the magic which device allows fsync(2) into > dd(1). Just do what the user says, if it is nonsense, give him an > error. Seems reasonable to me. > > I know this wording is similar to fsync(2), but I think

Re: dd conv=fsync

2019-02-15 Thread Alexander Bluhm
On Thu, Feb 14, 2019 at 05:20:13PM -0500, Ted Unangst wrote: > What does gnu dd do if the output is stdout? Is it an error? On Linux it fails with an error. linux$ yes | dd count=4 bs=1 conv=fsync y y dd: fsync failed for 'standard output': Invalid argument 4+0 records in 4+0 records out 4 bytes

Re: dd conv=fsync

2019-02-15 Thread Brent Cook
optimization. Others > > may like the reliable storage guarantee of fsync(2). > > > > Do we want dd conv=fsync in OpenBSD? > > What does gnu dd do if the output is stdout? Is it an error? > > With this patch, I get dd: fsync stdout: Invalid argument > gnu dd print

Re: dd conv=fsync

2019-02-14 Thread Ted Unangst
(2). > > Do we want dd conv=fsync in OpenBSD? What does gnu dd do if the output is stdout? Is it an error? With this patch, I get dd: fsync stdout: Invalid argument after the transfer is complete. Should there be an fstat check to make sure it's a regular file? > +.It Cm fsync > +W

dd conv=fsync

2019-02-14 Thread Alexander Bluhm
Hi, GNU dd has the conv=fsync feature which does an fsync(2) after final write to output. I find this useful for write performance measurement through the file system without buffer cache optimization. Others may like the reliable storage guarantee of fsync(2). Do we want dd conv=fsync