From owner-freebsd-arch@FreeBSD.ORG Thu Jun 7 19:36:03 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4988016A421; Thu, 7 Jun 2007 19:36:03 +0000 (UTC) (envelope-from eric.lemar@isilon.com) Received: from seaxch07.isilon.com (seaxch07.isilon.com [70.103.106.46]) by mx1.freebsd.org (Postfix) with ESMTP id 2607913C45B; Thu, 7 Jun 2007 19:36:03 +0000 (UTC) (envelope-from eric.lemar@isilon.com) x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 7 Jun 2007 12:31:56 -0700 Message-ID: <896DB1FBFFD5A145833D9DA08CA12A85051A84@seaxch07.desktop.isilon.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: *at family of syscalls in FreeBSD Thread-Index: Aceo0inqRC+S5FhYQpCTOlQ4A3wpJwAaFiul References: <20070604162430.GA76813@freebsd.org> <896DB1FBFFD5A145833D9DA08CA12A85051A7F@seaxch07.desktop.isilon.com> <20070606074429.GA42032@freebsd.org> <4666F0FB.8020101@FreeBSD.org> <20070607070455.GA71012@freebsd.org> From: "Eric Lemar" To: "Roman Divacky" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: arch@freebsd.org Subject: RE: *at family of syscalls in FreeBSD 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: Thu, 07 Jun 2007 19:36:03 -0000 I certainly don't want to hold anything from getting into the release. = I haven't had a chance to compare all the details of your patch and ours, but I've spent a bit of time looking through yours, and I'd say (not surprisingly) that what we've done is much more similar than not = and this is certainly a nice API to have even aside from the linux = compatibility reasons. At least conceptually, most of the differences are relatively minor stylistic differences. We've done the same NDINIT/namei() changes. Rather than have a set of kern_common_* functions, kern_open(), for instance, just calls kern_openat() using AT_FDCWD. kern_openat() has = all the actuall implementaiton. This lets us avoid adding a seperate kern_common_open() and the associated clutter with no real downside that = I can see. Basic pattern is: *kern_open() - calls kern_openat() with AT_FDCWD *kern_openat() - calls a funtion at_getwd() similar to your = kern_get_at *at_getwd() - In addition to your parameters, we also pass in the = flags and path. The flags let us do an isilon specific VOP to get a vp for the subfile container if the user passed in O_XATTR (solaris uses = this to access subfiles and I know linux has at least talked about if not implemented it). We include the path largely to avoid doing work if the path is absolute since the fd is supposed to be ignored in that case. Depending on how tightly you want to tat, you could argue whether it is valid to return an error due to an invalid fd if you pass in an absolute path (I haven't looked at draft posix or actual implementations to see what they do, but we just plain don't touch the fd at all in that case). eric ________________________________ From: Roman Divacky [mailto:rdivacky@FreeBSD.org] Sent: Thu 6/7/2007 12:04 AM To: Doug Barton Cc: Eric Lemar; arch@FreeBSD.org Subject: Re: *at family of syscalls in FreeBSD On Wed, Jun 06, 2007 at 10:38:03AM -0700, Doug Barton wrote: > Roman Divacky wrote: > > > my current patch is at: www.vlakno.cz/~rdivacky/linux_at.patch > > > > it does not implement the native fbsd syscalls, only the linuxulator = ones > > but adding those is a matter of minutes. I asked for a review by pjd = and/or > > rwatson and hopefully this will get commited soon.. > > My recollection of the last round of discussion was that you were > asked to implement these in our base, then wrap the linux versions. If > it's trivial to implement, it should probably be done that way first. well.. my implementation does exactly that :) I changed namei() routine = to check ni_startdir for possible startdir other then CWD and made the = kern_fooat() use it. the change is mostly self-contained (minus prototypes in = sys/sys/syscallsubr.h) in vfs_syscalls. with a very slight change (5 lines?) to vfs_lookup.c + = namei.h its quite simple. I cant comment the Isilon's version. My patch (the = approach) has been OKed by rwatson@ and pjd@. I'd really love to see this go to -current = before RELENG_7 so time is rushing. can someone from Isilon comment their version so we can compare benefits = etc.? roman