RE: *at family of syscalls in FreeBSD
- From: "Eric Lemar" <eric.lemar@xxxxxxxxxx>
- Date: Thu, 7 Jun 2007 12:31:56 -0700
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"
- Follow-Ups:
- Re: *at family of syscalls in FreeBSD
- From: Roman Divacky
- Re: *at family of syscalls in FreeBSD
- References:
- *at family of syscalls in FreeBSD
- From: Roman Divacky
- RE: *at family of syscalls in FreeBSD
- From: Eric Lemar
- Re: *at family of syscalls in FreeBSD
- From: Roman Divacky
- Re: *at family of syscalls in FreeBSD
- From: Doug Barton
- Re: *at family of syscalls in FreeBSD
- From: Roman Divacky
- *at family of syscalls in FreeBSD
- Prev by Date: setegid bug
- Next by Date: Re: Updated rusage patch
- Previous by thread: Re: *at family of syscalls in FreeBSD
- Next by thread: Re: *at family of syscalls in FreeBSD
- Index(es):
Relevant Pages
|
|