From owner-freebsd-hackers Sat Nov 20 0:16: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (Postfix) with ESMTP id C40E714C44 for ; Sat, 20 Nov 1999 00:16:05 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.9.3/8.9.3) with ESMTP id AAA60453; Sat, 20 Nov 1999 00:16:03 -0800 (PST) (envelope-from dwhite@resnet.uoregon.edu) Date: Sat, 20 Nov 1999 00:16:03 -0800 (PST) From: Doug White To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: What are short read and short write? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 19 Nov 1999, Zhihui Zhang wrote: > > Can anyone explain for me what are short read and short write? Under what > circumstances will they happen and how FreeBSD deals with them? I come > to this question while looking at code in file ufs/ufs_readwrite.c. A ``short read'' or ``short write'' are when the read() and write() system calls return less data than requested. For example, if you had the read call read(fd, &buf, 1024) and read could pull only 512 bytes from the file descriptor, read() would return 512 and that would be a short read. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message