USB: lost page write but no error reported on closing raw device

From: strawks
Date: Fri Jan 23 2009 - 11:27:52 EST


Hi all,

I was trying to copy my entire internal HDD to an USB HDD :
> dd if=/dev/hda of=/dev/sdb

dd finished without reporting errors but some blocks (around 102GB of 160) were not copied and I got in the syslog :

Jan 21 19:04:43 kernel: usb 4-2: reset high speed USB device using
ehci_hcd and address 4
Jan 21 19:04:43 kernel: sd 6:0:0:0: [sda] Result: hostbyte=DID_ERROR
driverbyte=DRIVER_OK,SUGGEST_OK
Jan 21 19:04:43 kernel: end_request: I/O error, dev sda, sector 272136241
Jan 21 19:04:43 kernel: Buffer I/O error on device sda4, logical block
104765468


I don't really know what caused the problem (btw I didn't disconnect the USB drive) but the fact is that there were an error copying data to the usb drive but this error were not reported to dd.

Is this the expected behaviour? Shouldn't the close() call repports the write error to dd?

Note : I tried on debian 2.6.26 stock kernel and 2.6.29-rc2, same behavior.

I have already copied HDD this way (IDE and SCSI but not USB), and each time IO errors occured dd would print some error message. I think

--
regards
strawks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/