]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r351770,r352920-r352923
authorMatt Macy <mmacy@FreeBSD.org>
Sun, 8 Dec 2019 04:19:05 +0000 (04:19 +0000)
committerMatt Macy <mmacy@FreeBSD.org>
Sun, 8 Dec 2019 04:19:05 +0000 (04:19 +0000)
commit94289a2aa1839f523aa701053122ba6d3b8bac9b
tree956be368a5bf13db92136e270ad6b10c32410495
parenta240180fe40fd0ed51ec1dbb6d276094bf69dc52
MFC r351770,r352920-r352923

MFCs to dd appear to have been haphazard so selectively
MFCing individually didn't work easily.

Add conv=fsync flag to dd

The fsync flag performs an fsync(2) on the output file before closing it.
This will be useful for the ZFS test suite.

Add conv=fdatasync flag to dd

The fdatasync flag performs an fdatasync(2) on the output file before closing it.
This will be useful for the ZFS test suite.

dd: Check result of close(2) for errors

close(2) can return errors from previous operations which should not be ignored.

Add oflag=fsync and oflag=sync capability to dd

Sets the O_FSYNC flag on the output file. oflag=fsync and oflag=sync are
synonyms just as O_FSYNC and O_SYNC are synonyms. This functionality is
intended to improve portability of dd commands in the ZFS test suite.

Add iflag=fullblock to dd

Normally, count=n means read(2) will be called n times on the input to dd. If
the read() returns short, as may happen when reading from a pipe, fewer bytes
will be copied from the input. With conv=sync the buffer is padded with zeros
to fill the rest of the block.

iflag=fullblock causes dd to continue reading until the block is full, so that
count=n means n full blocks are copied. This flag is compatible with illumos
and GNU dd and is used in the ZFS test suite.

Submitted by: Ryan Moeller, Thomas Hurst
Reviewed by: manpages, mmacy@
Sponsored by: iXsystems, Inc.
bin/dd/args.c
bin/dd/dd.1
bin/dd/dd.c
bin/dd/dd.h
bin/dd/extern.h