Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  1 May 2014 11:06:28 +0200 (CEST)
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/189174: dd conv=sparse bs=64k EINVAL on sparse last block
Message-ID:  <20140501090629.11CCB110AC@melamine.cuivre.fr.eu.org>
Resent-Message-ID: <201405010920.s419K0CJ053652@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189174
>Category:       bin
>Synopsis:       dd conv=sparse bs=64k EINVAL on sparse last block
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 01 09:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Quinot
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD melamine.cuivre.fr.eu.org 9.2-STABLE FreeBSD 9.2-STABLE #0 r256080: Sun Oct 6 15:33:30 CEST 2013 thomas@melamine.cuivre.fr.eu.org:/usr/obj/users/thomas/projects/FreeBSD/base/stable/9/sys/GENERIC amd64


	
>Description:
	When copying to an md device (or a slice thereof) with conv=sparse
	and an explicit block size, dd will produce an error if the last
	block is a sparse and partial one.

	(This breaks NanoBSD builds in the case where two system images
	are created, and the slice size computed from the media size
	is not an intregral multiple of 64k).

	This is with dd(1) from stable/9 as of rev 265172.

>How-To-Repeat:
# dd if=/dev/zero of=f1 count=129
129+0 records in
129+0 records out
66048 bytes transferred in 0.003451 secs (19139518 bytes/sec)
# dd if=/dev/zero of=f2 count=129
129+0 records in
129+0 records out
66048 bytes transferred in 0.003485 secs (18952274 bytes/sec)
# mdconfig -f f1
md0
# mdconfig -f f2
md1
# dd if=/dev/md0 of=/dev/md1 conv=sparse bs=64k
dd: /dev/md1: Invalid argument
1+1 records in
1+0 records out
65536 bytes transferred in 0.000338 secs (193849018 bytes/sec)

>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140501090629.11CCB110AC>