RE: *at family of syscalls in FreeBSD



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@xxxxxxxxxxx]
Sent: Thu 6/7/2007 12:04 AM
To: Doug Barton
Cc: Eric Lemar; arch@xxxxxxxxxxx
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


_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [PATCH] mmu notifiers #v2
    ... In short when the linux VM decides to free a page, ... This patch allows the shadow pagetables to be dropped and the page to ... behavior of the KVM gphysical memory. ...
    (Linux-Kernel)
  • Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]
    ... Con Kolivas wrote: ... surprising Ingo made it a separate patch set as Con has repeatedly ... gzip simply doesn't play well with others... ... than the scheduler in linux, and that's how much writes hurt just about ...
    (Linux-Kernel)
  • Re: CD writing in future Linux (stirring up a hornets nest)
    ... review in preparation for the proposed patch). ... do not understand implicit constraints from requiring orthogobality. ... way is removed from Linux. ... Linux to be used to _develop_ SCSI user space programs. ...
    (Linux-Kernel)
  • Re: CD writing in future Linux (stirring up a hornets nest)
    ... careful review of libscg in preparation for the patch I promised you, ... by Albert Cahalan, Linux does provide b,t,l addresses for ATA/ATAPI devices - ... do not understand implicit constraints from requiring orthogobality. ... the way to access SCSI generic via /dev/hd* is deprecated. ...
    (Linux-Kernel)
  • Re: dpreview
    ... and Apple sells software that runs on Windows too. ... You can compare Linux to Windows, but to do so you need to be ... the line between the GUI / Desktop and the OS is blurred ...
    (rec.photo.digital.slr-systems)