From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 10:53:49 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 409701065673 for ; Sat, 10 Jul 2010 10:53:49 +0000 (UTC) (envelope-from batrick@batbytes.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 15CAE8FC16 for ; Sat, 10 Jul 2010 10:53:48 +0000 (UTC) Received: by iwn35 with SMTP id 35so3837849iwn.13 for ; Sat, 10 Jul 2010 03:53:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.146.136 with SMTP id h8mr11131320ibv.0.1278759228306; Sat, 10 Jul 2010 03:53:48 -0700 (PDT) Received: by 10.231.172.20 with HTTP; Sat, 10 Jul 2010 03:53:48 -0700 (PDT) In-Reply-To: <87iq4nsr3a.fsf@kobe.laptop> References: <87iq4nsr3a.fsf@kobe.laptop> Date: Sat, 10 Jul 2010 06:53:48 -0400 Message-ID: From: Patrick Donnelly To: questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Writes to Hard Disk Going Beyond Capacity X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2010 10:53:49 -0000 On Sat, Jul 10, 2010 at 4:01 AM, Giorgos Keramidas wrote: > On Sat, 10 Jul 2010 03:10:31 -0400, Patrick Donnelly wrote: >> Hi List, >> >> I have a strange problem in a C program I wrote. I open a hard >> disk character file (/dev/ad1) and attempt to write over the >> entire disk. I expect the last write that would go beyond the >> hard disk length (capacity) to return with an error but instead >> the write succeeds. =C2=A0This happens for hundreds of gigabytes >> beyond the file (hard drive) length. What could be wrong? (This >> program works fine on Linux. The last write that would go >> beyond the end of the hard drive returns with -1.) >> >> Thanks for any help, > > Can we see the exact source code of the program? =C2=A0What you > describe might work if the file has holes inside it. http://www.batbytes.com/destroy Specifically, after filling the hard drive it will begin to rapidly "write" where the throughput of the writes is about 10 GB/s (obviously not going to the hard drive). --=20 - Patrick Donnelly