From owner-freebsd-arch@FreeBSD.ORG Wed Apr 16 18:05:51 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DDC11065671; Wed, 16 Apr 2008 18:05:51 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206046210.chello.pl [87.206.46.210]) by mx1.freebsd.org (Postfix) with ESMTP id 893CB8FC1C; Wed, 16 Apr 2008 18:05:50 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 01FBB45C89; Wed, 16 Apr 2008 20:05:48 +0200 (CEST) Received: from localhost (chello087206046210.chello.pl [87.206.46.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id AD1194569A; Wed, 16 Apr 2008 20:05:41 +0200 (CEST) Date: Wed, 16 Apr 2008 20:05:26 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20080416180526.GA32235@garage.freebsd.pl> References: <20071218092222.GA9695@freebsd.org> <200712201138.56423.jhb@freebsd.org> <20080412112019.GI45299@garage.freebsd.pl> <200804161014.41025.jhb@freebsd.org> <20080416165612.GA31094@garage.freebsd.pl> <20080416170341.GN95731@elvis.mu.org> <20080416184522.F1046@fledge.watson.org> <20080416175832.GX18958@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20080416175832.GX18958@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: Roman Divacky , Alfred Perlstein , Robert Watson , freebsd-arch@freebsd.org Subject: Re: final decision about *at syscalls X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2008 18:05:51 -0000 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 16, 2008 at 08:58:32PM +0300, Kostik Belousov wrote: > On Wed, Apr 16, 2008 at 06:52:12PM +0100, Robert Watson wrote: > > NDINIT() is already aware of the file descriptor array because it uses = that=20 > > to get the current working and root directories. And what the *at() sy= stem=20 > > calls are effectively doing is substituting another directory for the= =20 > > current working directory. The exact expression of all this doesn't ma= tter=20 > > all that much to me, but I think evaluating the file descriptor array f= or=20 > > directory stuff all in one place, rather than spread over the caller an= d=20 > > NDINIT(), is cleaner and avoids a lot of code everywhere. Nothing says= you=20 > > can't have: > >=20 > > void > > NDINIT(struct nameidata *ndp, u_long op, u_long flags, > > enum uio_seg segflg, const char *namep, struct thread *td); > >=20 > > void > > NDINIT_AT(struct nameidata *ndp, u_long op, u_long flags, > > enum uio_seg segflg, const char *namep, int fd, struct thread = *td); > >=20 > > NDINIT_DVP(struct nameidata *ndp, u_long op, u_long flags, > > enum uio_seg segflg, const char *namep, struct vnode *vp, > > struct thread *td); > >=20 > > However, I think I wouldn't want NDINIT_AT() to be a wrapper for=20 > > NDINIT_DVP(), because I'd like all that fdp following to occur together. >=20 > I already mailed the patch implementing all the above, modulo > s/_DVP/_ATVP/. I want to get the response from Pawel and others. If > positive, the patch is to be tested and committed. Back when we discussed NDINIT_AT(), I was a bit opposed, because I was afraid that we will grow more NDINIT_() functions. I preferred to just initialize additional arguments directly, eg. NDINIT(&nd, foo, bar); nd.ni_dirfd =3D fd; nd.ni_startvp =3D dvp; namei(&nd); At this point I don't really care, I can use NDINIT_DVP/NDINIT_ATVP. > I see no reason for heating the debate. Agreed. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFIBj/jForvXbEpPzQRAgO6AKDWUm3ngdma89OX/Ce7THAgKcJL7gCggABl fAyvTnNC1/DocpuLfJc6qhU= =DzdD -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--