Summary: | dd conv=sparse is broken since r265593 | ||
---|---|---|---|
Product: | Base System | Reporter: | Maxim Sobolev <sobomax> |
Component: | bin | Assignee: | Thomas Quinot <thomas> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | cy, emaste |
Priority: | --- | ||
Version: | 10.2-STABLE | ||
Hardware: | Any | ||
OS: | Any |
Description
Maxim Sobolev
2016-02-10 21:25:49 UTC
Maxim, Thanks for your report. A fix (slightly edited version of your patch) is available for review at https://reviews.freebsd.org/D5248. It also includes regression tests. Could you please double check that it fixes the problem for you? Thomas. A commit references this bug: Author: thomas Date: Thu Feb 18 08:44:17 UTC 2016 New revision: 295749 URL: https://svnweb.freebsd.org/changeset/base/295749 Log: Reorganize the handling all-zeroes terminal block in sparse mode The intent of the previous code in that case was to force an explicit write, but the implementation was incorrect, and as a result the write was never performed. This new implementation instead uses ftruncate(2) to extend the file with a trailing hole. Also introduce regression tests for these cases. PR: 189284 (original PR whose fix introduced this bug) PR: 207092 Differential Revision: D5248 Reviewed by: sobomax,kib MFC after: 2 weeks Changes: head/bin/dd/Makefile head/bin/dd/dd.c head/bin/dd/dd.h head/bin/dd/gen.c head/bin/dd/ref.obs_zeroes A commit references this bug: Author: thomas Date: Tue Apr 19 07:34:32 UTC 2016 New revision: 298258 URL: https://svnweb.freebsd.org/changeset/base/298258 Log: MFC r295749: Reorganize the handling all-zeroes terminal block in sparse mode PR: 189284 (original PR whose fix introduced this bug) PR: 207092 Changes: _U stable/10/ stable/10/bin/dd/Makefile stable/10/bin/dd/dd.c stable/10/bin/dd/dd.h stable/10/bin/dd/gen.c stable/10/bin/dd/ref.obs_zeroes |