From owner-freebsd-current@FreeBSD.ORG Sat Apr 21 00:11:49 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0995216A401 for ; Sat, 21 Apr 2007 00:11:49 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id DD16013C455 for ; Sat, 21 Apr 2007 00:11:48 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 25063 invoked from network); 21 Apr 2007 00:11:50 -0000 Received: from ppp-71-139-34-102.dsl.snfc21.pacbell.net (HELO ?10.0.0.235?) (nate-mail@71.139.34.102) by root.org with ESMTPA; 21 Apr 2007 00:11:50 -0000 Message-ID: <462956BE.3050904@root.org> Date: Fri, 20 Apr 2007 17:11:42 -0700 From: Nate Lawson User-Agent: Thunderbird 1.5.0.7 (X11/20061027) MIME-Version: 1.0 To: Yar Tikhiy References: <460AE39B.4070706@root.org> <86ps6g5759.fsf@dwp.des.no> <4617F563.40502@root.org> <200704181648.46348.jhb@freebsd.org> <20070420074423.GA22594@comp.chem.msu.su> <4628F76F.80608@root.org> <20070421000649.GD52136@comp.chem.msu.su> In-Reply-To: <20070421000649.GD52136@comp.chem.msu.su> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Dag-Erling Sm?rgrav , freebsd-current@freebsd.org Subject: Re: libfetch ftp patch for less latency X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Apr 2007 00:11:49 -0000 Yar Tikhiy wrote: > On Fri, Apr 20, 2007 at 10:25:03AM -0700, Nate Lawson wrote: >> Yar Tikhiy wrote: >>> On Wed, Apr 18, 2007 at 04:48:45PM -0400, John Baldwin wrote: >>>> On Saturday 07 April 2007 15:47, Nate Lawson wrote: >>>>> Dag-Erling Sm?rgrav wrote: >>>>>> Nate Lawson writes: >>>>>>> Obviously, it's easier to do nothing than something. So here are some >>>>>>> options: >>>>>>> >>>>>>> 1. Add my patch -- if a server returns an error, I see no way it would >>>>>>> have changed the PWD. If you say "CD GARBAGE", what reasonable system >>>>>>> would return an error and change to some random dir? >>>>>>> >>>>>>> 2. Add an env variable (similar to FTP_PASSIVE_MODE, say >>>>>>> "FTP_SINGLE_CWD") which forces the current behavior. If not set, fetch >>>>>>> tries the multi-method first, falls back to the single-method on error. >>>>>> No. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> DES >>>>> I forgot: >>>>> >>>>> 3. #ifdef (on or off by default) >>>>> >>>>> Also, can I hear from anyone else besides Mr. No? >>>> I'm hestitant to make fetch explicitly not follow the RFC. At the least it >>>> should follow the RFC by default. Having it not follow the RFC actually >>>> broke stuff at work until I fixed it. >>> I believe that the proposed feature should be conditional on the >>> TVFS extension in the server (RFC 3659) as it indeed violates the >>> basic FTP protocol. OTOH, TVFS seems to provide guarantees that >>> a single CWD will work as expected. >>> >> I'll do the work if this is acceptable. > > I'm afraid you'll have to get an approval from Mr. No anyway > to commit that. :-) > > I also wonder if there are enough TVFS conformant FTP servers out > there to justify the work and the risk. But there's good news, > too: > > yar@jujik:~$ftp -d -a ftp.freebsd.org > Trying 2001:6c8:6:4::7... > Trying 2001:4f8:0:2::e... > Trying 204.152.184.73... > Connected to ftp.freebsd.org. > [...] > ---> FEAT > 211-Features: > EPRT > EPSV > MDTM > PASV > REST STREAM > SIZE > TVFS > 211 End > features[FEAT_FEAT] = 1 > features[FEAT_MDTM] = 1 > features[FEAT_MLST] = 0 > features[FEAT_REST_STREAM] = 1 > features[FEAT_SIZE] = 1 > features[FEAT_TVFS] = 1 > > 62.243.72.50 tells it supports TVFS, too. > > Our stock ftpd(8) has just started to announce TVFS support, too, > but only when in UTF-8 mode because RFC 3659 says that TVFS implies > UTF-8 file names. > proftpd does not have TVFS although it has FEAT. Hmm, guess this is too advanced. Anyone have an issue with me committing the code under an #ifdef, off by default? I'll make a note in the src about TVFS support as a todo. I only use fetch on some servers for pkg_add and it really would be a win to not have the added latency. -- Nate