Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2003 21:03:14 +0400 (MSD)
From:      Spartak Radchenko <spartak@aif.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        re@FreeBSD.org
Subject:   kern/56871: dd can't write variable length data blocks to SCSI DDS streamer.
Message-ID:  <200309141703.h8EH3EWv000817@corwin.aif.ru>
Resent-Message-ID: <200309141710.h8EHAG3A040471@freefall.freebsd.org>

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

>Number:         56871
>Category:       kern
>Synopsis:       dd can't write variable length data blocks to SCSI DDS streamer.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 14 10:10:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Spartak Radchenko
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
Arguments & Facts Weekly
>Environment:
System: FreeBSD corwin.aif.ru 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Sun Sep 14 18:44:54 MSD 2003 spartak@corwin.aif.ru:/usr/obj/usr/src/sys/corwin i386
>Description:

dd can't write the last short data block to SCSI DDS streamer.
Moreover, it can't write variable length records, only in multiples of 1024.
This problem was introduced in RELENG_4 between Aug 14 and Sep 10 2003.

>How-To-Repeat:

	corwin# dd if=/dev/zero ibs=1024 count=1 obs=1024 of=/dev/sa0
	1+0 records in
	1+0 records out
	1024 bytes transferred in 0.001765 secs (580166 bytes/sec)
	corwin#

1024 bytes are written, all OK.

	corwin# dd if=/dev/zero ibs=1025 count=1 obs=1024 of=/dev/sa0
	dd: /dev/sa0: Invalid argument
	1+0 records in
	1+0 records out
	1024 bytes transferred in 0.004238 secs (241623 bytes/sec)
	corwin#

The last byte from 1025 is lost. There is a message in /var/log/messages:

Sep 14 20:39:52 corwin /kernel: (sa0:ahd1:0:0:0): Invalid request.
Fixed block device requests must be a multiple of 1024 bytes

>Fix:
I don't know the fix for this problem. In some cases a simple workaround
can be used: dd if=... of=/dev/sa0 obs=1024 conv=osync

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



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