[OpenAFS] Re: [OpenAFS-devel] interface for vos split

Steven Jenkins steven.jenkins@gmail.com
Thu, 8 Jan 2009 14:08:17 -0500

First, my apologies for not getting the mailing lists right the first
time.  I'm cross-posting my reply to Russ in hopes that this thread
will be the main one.

On Thu, Jan 8, 2009 at 1:44 PM, Russ Allbery <rra@stanford.edu> wrote:
>> # /usr/afs/bin/vos split -id osd.1 -newname osd.1.a -dirname
>> bin.1.4.8-osd.hartmut
> I'd like this a lot better.

I can see why some would like that better, but, for me, the most obvious is:

/usr/afs/bin/vos split -id osd.1 -newname osd.1.a -dirname /afs/mycell./a/b/c

i.e., an absolute path.

The problem with that is that it more or less requires the user of vos
split to be running in a cache manager so that the volumes and paths
between / and the directory to split at can be resolved.

Putting that into a vos command is very difficult.  And traditionally
vos commands have had no dependencies on a cache manager (getting
credentials and determining the local cell information are the primary
exceptions, but there are no filesystem dependencies).

But I'll add the relative pathname support if that's what others want.

>> So some questions on that:
>> 1- Is the current user interface undesirable?
>> 2- Is the suggested  interface better?
>> 3- If the suggested interface is better, how should the interface be
>> implemented?  The suggestion I received was to add an RPC to vos;
>> would we want that interface exposed (e.g., as a vos command), or
>> would it be better to stay as an internal RPC (much as AFSVolForward
>> works today)
> Why wouldn't vos do the same thing that fs getfid currently does to get
> the vnode?

fs getfid is in the cache manager.  Since vos is user-space, it
doesn't have access to the same routines.  An RPC to the volserver was
suggested as the best way to handle that.  My follow-up question on #3
is primarily to ask if that's how we want it handled, and if we want
to expose that interface via a vos command.  In other words, would a
command like:

vos getvnode -volume $vol -relative_path path

be useful.

> It should, of course, double-check that the directory name given is within
> the volume that one is splitting.


Steven Jenkins
End Point Corporation