delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/08/11:37:08

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <c8ec85e70810080836v12949bcctde634bf75dc71baa@mail.gmail.com>
Date: Wed, 8 Oct 2008 11:36:17 -0400
From: "Andrew Medico" <a DOT medico AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: dd fails with iflag=direct
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I'm running into a problem with dd's "iflag=direct" option in Cygwin.
When I combine it it with "conv=sync,noerror", dd successfully reads
all of the data from the device but once it gets to the end of the
device it starts reporting I/O errors and never terminates:

$ dd if=/dev/sdd of=/dev/null conv=sync,noerror iflag=direct
dd: reading `/dev/sdd': Input/Output error
1952767+0 records in
1952767+0 records out
999816704 bytes (1.0 GB) copied, 1678.11 s, 596 kB/s
dd: `/dev/sdd': cannot seek: Invalid argument
dd: reading `/dev/sdd': Input/Output error
1952767+1 records in
1952768+0 records out
999817216 bytes (1.0 GB) copied, 1680.11 s, 595 kB/s
dd: reading `/dev/sdd': Input/Output error
1952767+2 records in
1952769+0 records out
999817728 bytes (1.0 GB) copied, 1682.11 s, 594 kB/s
(etc.)

This is with Cygwin 1.5.25 on Windows XP Pro SP2, 32-bit. The devices
I've tested against are IDE hard drives and USB flash drives, all with
512-byte sectors.

I have tried various block sizes (512, 32768, 65536) and the result is the same.

The same dd commands with the same drives on a Linux machine work as
expected (no errors, successful termination).

One detail I've noticed is that this seems to happen only when reading
entire drives. Reading individual partitions on the same drives
completes without error.

-- 
Andrew Medico <a DOT medico AT gmail DOT com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019