From ortmann@sparc.isl.net  Sun Feb 15 10:54:31 1998
Received: from pyrl.eye (ppp-51.isl.net [199.3.25.100])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA08147
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Feb 1998 10:54:30 -0800 (PST)
          (envelope-from ortmann@sparc.isl.net)
Received: (from ortmann@localhost)
	by pyrl.eye (8.8.8/8.8.8) id MAA01879;
	Sun, 15 Feb 1998 12:45:52 -0600 (CST)
	(envelope-from ortmann)
Message-Id: <199802151845.MAA01879@pyrl.eye>
Date: Sun, 15 Feb 1998 12:45:52 -0600 (CST)
From: Daniel Ortmann <ortmann@sparc.isl.net>
Reply-To: ortmann@sparc.isl.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: dd drops block when of=/dev/rfd0a
X-Send-Pr-Version: 3.2

>Number:         5755
>Category:       bin
>Synopsis:       dd drops block when of=/dev/rfd0a
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 15 11:00:00 PST 1998
>Closed-Date:    Thu Feb 19 05:56:10 PST 1998
>Last-Modified:  Thu Feb 19 05:58:45 PST 1998
>Originator:     Daniel Ortmann
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
N/A
>Environment:

no special env needed

>Description:

$ dd if=kernel of=/dev/rfd0a
dd: /dev/rfd0a: Invalid argument
2294+1 records in
2294+0 records out
1174528 bytes transferred in 45.534150 secs (25794 bytes/sec) ***

$ dd if=kernel of=kernel.sizetest
2294+1 records in
2294+1 records out
1174679 bytes transferred in 0.901669 secs (1302783 bytes/sec) ***

$ ll kernel*
-rwxr-xr-x  1 root  bin  1174679 Feb 15 12:31 kernel*
-rw-r--r--  1 root  bin  1174679 Feb 15 12:33 kernel.sizetest

Note the size difference between the lines marked with '***'.

>How-To-Repeat:

see above

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jmg 
State-Changed-When: Thu Feb 19 05:56:10 PST 1998 
State-Changed-Why:  
some device have a minimum size that you can write to...  mose disk devices 
have a min of 512bytes...  to write the final block out to disk, also add 
conv=osync to the dd line which will force the final block to be writen... 

# dd if=as of=/dev/rda1b conv=osync 
0+1 records in 
1+0 records out 
512 bytes transferred in 0.004164 secs (122959 bytes/sec) 
# ls -l as 
-rw-r--r--  1 jmg  jmg  13 Feb 19 05:53 as 
>Unformatted:
