Date: Mon, 12 Jul 2010 16:12:39 -0400 From: Patrick Donnelly <batrick@batbytes.com> To: freebsd-stable@freebsd.org Subject: 8.0-Release Writes Go Beyond HD Capacity Message-ID: <AANLkTik5vyuD6w-_7lqaonmD7rvZO9cHIGrmaL2hoEkE@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik5vyuD6w-_7lqaonmD7rvZO9cHIGrmaL2hoEkE>