From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 2 13:10:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B14431065673 for ; Sun, 2 Mar 2008 13:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 92BB88FC1F for ; Sun, 2 Mar 2008 13:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m22DA1kk008217 for ; Sun, 2 Mar 2008 13:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m22DA13p008216; Sun, 2 Mar 2008 13:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 2 Mar 2008 13:10:01 GMT Resent-Message-Id: <200803021310.m22DA13p008216@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Hibma Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E535106567B for ; Sun, 2 Mar 2008 13:03:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 02C9C8FC19 for ; Sun, 2 Mar 2008 13:03:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m22D0gvD091188 for ; Sun, 2 Mar 2008 13:00:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m22D0gbg091187; Sun, 2 Mar 2008 13:00:42 GMT (envelope-from nobody) Message-Id: <200803021300.m22D0gbg091187@www.freebsd.org> Date: Sun, 2 Mar 2008 13:00:42 GMT From: Nick Hibma To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: bin/121287: dd ignores any conversions if 'bs' was specified X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2008 13:10:01 -0000 >Number: 121287 >Category: bin >Synopsis: dd ignores any conversions if 'bs' was specified >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 02 13:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: 6-STABLE >Organization: AnyWi Technologies >Environment: System: FreeBSD hind.van-laarhoven.org 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #20: Fri Dec 14 13:39:34 CET 2007 root@hind.van-laarhoven.org:/usr/src/sys/i386/compile/HIND i386 >Description: If you specify a block size with bs (probably with ibs and obs as well) any conversions will be ignored, notable bs. If you copy a large file (CF image file in my case) reading in large block sizes is preferrable, especially on for example USB devices. >How-To-Repeat: nick@hind:/usr/home/nick % dd bs=1M count=1 if=/dev/zero of=sparsefile.1 1+0 records in 1+0 records out 1048576 bytes transferred in 0.098494 secs (10646084 bytes/sec) nick@hind:/usr/home/nick % dd count=1 if=/dev/zero of=sparsefile.2 1+0 records in 1+0 records out 512 bytes transferred in 0.000175 secs (2925727 bytes/sec) nick@hind:/usr/home/nick % du -sk sparsefile.* 1040 sparsefile.1 2 sparsefile.2 >Fix: The following code fragment shows the problematic code: src/bin/dd.c:349: rev.1.43 /* * POSIX states that if bs is set and no other conversions * than noerror, notrunc or sync are specified, the block * is output without buffering as it is read. */ if (ddflags & C_BS) { out.dbcnt = in.dbcnt; dd_out(1); in.dbcnt = 0; continue; } >Release-Note: >Audit-Trail: >Unformatted: X-REMOTE_ADDR-Is-Open-Proxy: Maybe X-Send-Pr-Version: www-3.1 X-GNATS-Notify: