From owner-freebsd-current Sun Aug 11 8:21: 8 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D72C337B400; Sun, 11 Aug 2002 08:21:04 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3A7E43E75; Sun, 11 Aug 2002 08:21:03 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id g7BFKmOo057056; Sun, 11 Aug 2002 11:20:49 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 11 Aug 2002 11:20:48 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Maxim Konovalov Cc: Gavin Atkinson , current@FreeBSD.org Subject: Re: sendfile(2) is broken (Was: ftpd problem: Input/output error) In-Reply-To: <20020811140826.J68457-100000@news1.macomnet.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 11 Aug 2002, Maxim Konovalov wrote: > This is sendfile(2) mis-behaviour arised after rev.1.109 > sys/kern/uipc_syscalls.c but I think the real problem in vn_rdwr(), > sys/kern/vfs_vnops.c. Here is my patch but I really need somebody with > vfs clue. I CC'ed Robert Watson as an author of sendfile(2) > modification and our vfs expert. Semen Ustimenko ran into a similar problem, but his fix was to teach sendfile() to pass in a non-NULL resid and handle the failure mode better. I suspect this fix is more correct since it will both handle the failure mode and the data delivered, and probably is required for other consumers of vn_rdwr(). He was going to run the patch past dg, and then commit it assuming dg approved it, so hopefully it will go into the tree in the next day or so. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message