From owner-freebsd-stable@FreeBSD.ORG Mon Jul 12 20:35:59 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC80D106566C for ; Mon, 12 Jul 2010 20:35:59 +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 B46518FC1E for ; Mon, 12 Jul 2010 20:35:59 +0000 (UTC) Received: by iwn35 with SMTP id 35so6243386iwn.13 for ; Mon, 12 Jul 2010 13:35:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.8.212 with SMTP id j20mr2420481icj.20.1278965559362; Mon, 12 Jul 2010 13:12:39 -0700 (PDT) Received: by 10.231.172.20 with HTTP; Mon, 12 Jul 2010 13:12:39 -0700 (PDT) Date: Mon, 12 Jul 2010 16:12:39 -0400 Message-ID: From: Patrick Donnelly To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: 8.0-Release Writes Go Beyond HD Capacity X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 20:35:59 -0000 Hi List, I brought a question to the freebsd-questions list [1] about write problem I was experiencing when writing directly to a hard drive device. The workflow is: fd = open("/dev/ad1", O_WRONLY|O_SYNC); write(fd, buf, BUFSIZ); /* loop until drive full error (write(...) == -1) */ close(fd); On my box with 8.0 Release, the write loop will constantly return 0 (nothing written) after I reach the end of the hard drive capacity. After discussion in the earlier linked thread [1] and a look at the specification [2], I think this may be a bug in the implementation. Shouldn't write return an error code? [1] http://lists.freebsd.org/pipermail/freebsd-questions/2010-July/218628.html [2] http://www.opengroup.org/onlinepubs/000095399/functions/write.html -- - Patrick Donnelly