From owner-freebsd-current Thu Jul 18 10:48:43 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 B1AF737B400 for ; Thu, 18 Jul 2002 10:48:40 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A06543E5E for ; Thu, 18 Jul 2002 10:48:38 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 23131 invoked from network); 18 Jul 2002 17:48:36 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 18 Jul 2002 17:48:36 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6IHmY062163; Thu, 18 Jul 2002 13:48:34 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 18 Jul 2002 13:48:40 -0400 (EDT) From: John Baldwin To: John Baldwin Subject: RE: Questions about kern_descrip.c Cc: current@FreeBSD.org, dillon@FreeBSD.org 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 18-Jul-2002 John Baldwin wrote: > In revision 1.94 of kern_descrip.c, in the dup2() syscall a goto > retry loop was added so that if we did a fdalloc() we always retested > everything. Since fd_nfiles can't shrink and new and old can't > change, I don't see why the loop is necessary. Neither dup() or > the F_DUPFD fcntl() were modified in this way either. Also, > calling fdalloc() in this case is somewhat bogus, because fdalloc() > is going to try and reserve an open slot and update variables such > as fd_lastfile, etc. appropriately. Perhaps we should have an > fdextend() function that both dup2() and fdalloc() call? Also, > in do_dup() you have commented out the call to munmapfd() on an > open file with UF_MAPPED and never turned it back on. Was that > intentional or just an accidental oversight? Nevermind about munmapfd(). -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message