From owner-freebsd-current@FreeBSD.ORG Sun Dec 8 16:55:55 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6D08F5E for ; Sun, 8 Dec 2013 16:55:55 +0000 (UTC) Received: from lamora.getmail.no (lamora.getmail.no [84.210.184.7]) by mx1.freebsd.org (Postfix) with ESMTP id 51F271FC2 for ; Sun, 8 Dec 2013 16:55:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lamora.getmail.no (Postfix) with ESMTP id 6EFFD1DD987; Sun, 8 Dec 2013 17:55:47 +0100 (CET) X-Spam-Flag: NO X-Spam-Score: -2.88 X-Spam-Level: X-Spam-Status: No, score=-2.88 tagged_above=-10 required=6.6 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_FAKE_REPLY_SURE_A=0.01, T_FAKE_REPLY_SURE_B=0.01, T_KHOP_THREADED=-0.01, T_LONG_HEADER_LINE_80=0.01, T_NOT_A_PERSON=-0.01, T_UNKNOWN_ORIGIN=0.01] autolearn=ham Received: from lamora.getmail.no ([127.0.0.1]) by localhost (lamora.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id V6O-VcEYmkvt; Sun, 8 Dec 2013 17:55:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lamora.getmail.no (Postfix) with ESMTP id BF3EB1DD98D; Sun, 8 Dec 2013 17:55:46 +0100 (CET) X-Virus-Scanned: amavisd-new at Received: from lamora.getmail.no ([127.0.0.1]) by localhost (lamora.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id agxCBF0XJZ88; Sun, 8 Dec 2013 17:55:46 +0100 (CET) Received: from onyx.thanelange.no (cm-84.208.179.208.getinternet.no [84.208.179.208]) by lamora.getmail.no (Postfix) with ESMTP id 94EB11DD987; Sun, 8 Dec 2013 17:55:46 +0100 (CET) Date: Sun, 8 Dec 2013 17:55:46 +0100 From: Gyrd Thane Lange To: Olivier =?UTF-8?B?Q29jaGFyZC1MYWJiw6k=?= Subject: Re: Regression on -current with mdconfig or dd Message-ID: <20131208175546.2a7815ad@onyx.thanelange.no> In-Reply-To: References: X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 16:55:55 -0000 On Sun, 8 Dec 2013 15:50:55 +0100 Olivier Cochard-Labb=C3=A9 wrote: > Hi, >=20 > I found a regression on current: > The problem is meet with dd but I'm not sure it's the root cause. >=20 > Here is how to reproduce the problem easily with 3 commands: >=20 > dd if=3D/dev/zero of=3D/tmp/SOURCE.img seek=3D100000 count=3D0 > mdconfig -a -t vnode -f /tmp/SOURCE.img > dd conv=3Dsparse if=3D/dev/md0 of=3D/tmp/DEST.img bs=3D64k >=20 > =3D> This last "dd" works great on 10.0-BETA3 and older but failed on > -current (r258675 and r259096) with the message: > dd: /dev/md0s1: Input/output error Hi, I can confirm this problem also exists on my 11-CURRENT (late november). It is not md-specific as I also see it with real disks: This example is from a partition that is exactly 34 sectors large. (512 sector size). [root@onyx ~]# dd if=3D/dev/ada2p9 | hd 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * dd: /dev/ada2p9: Input/output error 35+0 records in 35+0 records out 17920 bytes transferred in 0.269167 secs (66576 bytes/sec) 00004600 But still it tries to overshoot and read size+1 sectors. BTW I don't know where it gets the data for the last sector since the partition following this has non-zero data in its first sector but dd thinks it got a zero filled sector. On my other system, FreeBSD 8.3 the dd gets this right by copying exactly 34 sectors (even if I try to specify count=3D35 or larger). An even shorter method of reproducing is to create a 34 * 512 =3D 17408 byte memory backed device and read from it: # mdconfig -a -t malloc -s 34 -u 1 # dd if=3D/dev/md1 of=3D/dev/null dd: /dev/md1: Input/output error 35+0 records in 35+0 records out 17920 bytes transferred in 0.000354 secs (50614093 bytes/sec) Try to write to it: # dd if=3D/dev/zero of=3D/dev/md1 dd: /dev/md1: Input/output error 36+0 records in 35+0 records out 17920 bytes transferred in 0.000459 secs (39045157 bytes/sec) Where does it write the data to? (Have not dared to try on a real disk yet.) Gyrd ^_^ >=20 > Regards, >=20 > Olivier > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"