bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #24140] Painfully slow find(1) in list-permission-only AFS path


From: Jeffrey Hutzelman
Subject: Re: [bug #24140] Painfully slow find(1) in list-permission-only AFS paths
Date: Mon, 01 Sep 2008 20:25:11 -0400

--On Monday, September 01, 2008 11:12:31 PM +0000 "Daniel Richard G." <address@hidden> wrote:

If we use libafs, we may as well go all the way and have find(1) check the
permissions on each directory (if in AFS) and cue off of that.

libafs is not the library you are looking for.
OpenAFS calls the library you are looking for libsys, but it has quite a few dependencies. By the time you pull in everything, you end up with a complete copy of the Rx libraries, among other things (this is not gratuitous; under certain circumstances the library will handle AFS "system calls" by making an RPC instead of a system call. This allows AFS utilities to work on a system which has user-mode tools but no AFS kernel module, and so is using an AFS/NFS translator).

If it's available, you're better off using libkrbafs or libkafs, which provide a more minimal interface consisting of k_hasafs() and k_pioctl(), plus a few things you don't need.

Note that you cannot assume that AFS exists and AFS system calls will work just because you found AFS libraries. Some of the libraries mentioned above are included in a number of Linux distributions and may be included in other systems as well, and even if AFS is installed, the AFS kernel module may not yet be loaded. On some platforms, you will get SIGSYS if you try to make an AFS system call under these circumstances. The libkrbafs/libkafs interfaces will protect you from this; k_hasafs() is always safe to call, and if it succeeds, then you know you can call k_pioctl() safely.

-- Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]