From owner-freebsd-stable@FreeBSD.ORG Sun Sep 14 10:03:18 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B33C16A4BF; Sun, 14 Sep 2003 10:03:18 -0700 (PDT) Received: from corwin.aif.ru (corwin.aif.ru [212.15.98.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2429D43FBF; Sun, 14 Sep 2003 10:03:17 -0700 (PDT) (envelope-from spartak@corwin.aif.ru) Received: from corwin.aif.ru (localhost [127.0.0.1]) by corwin.aif.ru (8.12.9/8.12.9) with ESMTP id h8EH3FED000818; Sun, 14 Sep 2003 21:03:15 +0400 (MSD) (envelope-from spartak@corwin.aif.ru) Received: (from spartak@localhost) by corwin.aif.ru (8.12.9/8.12.9/Submit) id h8EH3EWv000817; Sun, 14 Sep 2003 21:03:14 +0400 (MSD) (envelope-from spartak) Date: Sun, 14 Sep 2003 21:03:14 +0400 (MSD) Message-Id: <200309141703.h8EH3EWv000817@corwin.aif.ru> To: FreeBSD-gnats-submit@freebsd.org From: Spartak Radchenko X-send-pr-version: 3.113 X-GNATS-Notify: cc: stable@freebsd.org cc: re@freebsd.org Subject: dd can't write variable length data blocks to SCSI DDS streamer. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Spartak Radchenko List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2003 17:03:18 -0000 >Submitter-Id: current-users >Originator: Spartak Radchenko >Organization: Arguments & Facts Weekly >Confidential: no >Synopsis: dd can't write variable length data blocks to SCSI DDS streamer. >Severity: serious >Priority: high >Category: kern >Class: sw-bug >Release: FreeBSD 4.9-PRERELEASE i386 >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