From owner-freebsd-current Mon Aug 12 1: 2:31 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 8E4BA37B400; Mon, 12 Aug 2002 01:02:28 -0700 (PDT) Received: from relay1.macomnet.ru (relay1.macomnet.ru [195.128.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFDD843E3B; Mon, 12 Aug 2002 01:02:26 -0700 (PDT) (envelope-from maxim@FreeBSD.org) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay1.macomnet.ru (8.11.6/8.11.6) with ESMTP id g7C82Pf3357785; Mon, 12 Aug 2002 12:02:25 +0400 (MSD) Date: Mon, 12 Aug 2002 12:02:25 +0400 (MSD) From: Maxim Konovalov X-X-Sender: maxim@news1.macomnet.ru To: "Semen A. Ustimenko" Cc: Robert Watson , Maxim Konovalov , Gavin Atkinson , Subject: Re: sendfile(2) is broken (Was: ftpd problem: Input/output error) In-Reply-To: <20020812033540.F1596-100000@main.the.net> Message-ID: <20020812114358.E56725-100000@news1.macomnet.ru> 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 03:37+0700, Aug 12, 2002, Semen A. Ustimenko wrote: > Hi! > > On Sun, 11 Aug 2002, Robert Watson wrote: > > > 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. > > > > David reviewed the patch and I have committed it few minutes ago. Looks like a hack BDE is speaking about: passing a storage for residue but never check it. Anyway I don't understand why VOP_READ in vn_rdwr() returns a residue in uio.uio_resid when all data trasferred actually? -- Maxim Konovalov, maxim@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message