From owner-freebsd-net@FreeBSD.ORG Tue Jan 31 14:56:20 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73F8216A420 for ; Tue, 31 Jan 2006 14:56:20 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70AD843D46 for ; Tue, 31 Jan 2006 14:56:18 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id k0VEuDxW038149; Tue, 31 Jan 2006 17:56:13 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id k0VEuDr5038148; Tue, 31 Jan 2006 17:56:13 +0300 (MSK) (envelope-from yar) Date: Tue, 31 Jan 2006 17:56:12 +0300 From: Yar Tikhiy To: Iassen Anadoliev Message-ID: <20060131145612.GE34373@comp.chem.msu.su> References: <43DB8EEA.6090006@mac.com> <20060130125746.GB44477@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060130125746.GB44477@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org Subject: Re: Ftpd problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2006 14:56:20 -0000 On Mon, Jan 30, 2006 at 03:57:46PM +0300, Yar Tikhiy wrote: > On Sat, Jan 28, 2006 at 06:25:34PM +0200, Iassen Anadoliev wrote: > > Chuck Swiger writes: > > > > >Iassen Anadoliev wrote: > > >>Hello guys i hope this is the appropriate list so... > > >> > > >>I am running a ftp server and have some problems with large files. While > > >>syncing files over 4GB with rsync there is no problem: > > >> > > >>ls -lha > > >>-rw------- 1 support support 4.2G Nov 14 19:46 somefile.data > > >> > > >>But when i try to download the file it fails: > > > > > >If you can identify more specificly which side is having the problem, it's > > >probably worth filing a PR about it. Try using fetch or curl instead, to > > >see > > >whether another client does OK, or try using proftpd to test another FTP > > >server. > > Never sent PR before. So trying to find PR that already describe my > > problem I found this: > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=bin/89100 > > We seem to have got a bug in sendfile(2). Besides bin/89100, there > is kern/92243 on it. The problem is rather unpleasant and it's in > the kernel, not in ftpd(8). Would you mind trying the attached kernel patch? Note that you'll need to rebuild the modules along with the kernel after applying the patch. Thanks in advance! The patch is against HEAD. In case it fails to apply, just change the type of the 2nd argument to vnode_create_vobject from size_t to off_t in the .h and .c files -- that's the essence. -- Yar Index: sys/vnode.h =================================================================== RCS file: /home/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.312 diff -u -p -r1.312 vnode.h --- sys/vnode.h 15 Jan 2006 02:01:51 -0000 1.312 +++ sys/vnode.h 31 Jan 2006 13:58:29 -0000 @@ -700,7 +700,7 @@ void vref(struct vnode *vp); int vrefcnt(struct vnode *vp); void v_addpollinfo(struct vnode *vp); -int vnode_create_vobject(struct vnode *vp, size_t size, struct thread *td); +int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td); void vnode_destroy_vobject(struct vnode *vp); extern struct vop_vector fifo_specops; Index: vm/vnode_pager.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vnode_pager.c,v retrieving revision 1.224 diff -u -p -r1.224 vnode_pager.c --- vm/vnode_pager.c 1 Nov 2005 23:00:24 -0000 1.224 +++ vm/vnode_pager.c 31 Jan 2006 13:58:30 -0000 @@ -97,7 +97,7 @@ int vnode_pbuf_freecnt; /* Create the VM system backing object for this vnode */ int -vnode_create_vobject(struct vnode *vp, size_t isize, struct thread *td) +vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) { vm_object_t object; vm_ooffset_t size = isize;