Hi,

A few of us (mmeffie, tkeiser, adeason, myself) found ourselves discussing the 
topic of defining an implementation-agnostic directory listing interface as 
part of RPC refresh a month or so ago.  We agreed I'd make an attempt to start 
some new discussion.

I've tied up some busy people's time, including my own, in trying to elicit 
some discussion in conference.openafs.org.  Nothing definitive emerged there, 
but some good feedback was developed.  I'd like to to throw what I have 
prototyped out for discussion here, I don't assert primacy over the topic, only 
don't like wasting people's effort.

The discussion was at a general level, not everyone had time to read the 
grammar I was suggesting.

Key ideas I heard expressed:

1. FetchDirectory RPC (a possible name) is not covered in 2005 directory format 
extensions writeup (hackathon, sweden), but that may need revisiting (jhutz)

2. longer filenames are an emerging reality--but people lack intuitions about 
how how AFS protocol should adapt

3. directory entries need multiple representations, perhaps 3 (unicode, legacy 
8-bit, and Windows short name)

4. rpc should permit a paging notion--I'm proposing that can be just be an 
offset into the list the server is producing at the current dv on 
DirFid--client can keep advancing by Entries_len until it's read all it wants

5. directory entries cannot be looked up, as server doesn't know applicable 
normalization rules

6. directory entries are not returned in some sorted order (with accompanying 
complexity), unless someone can really make a strong case to change precedent 
(jhutz)

more here: 
http://conference.openafs.org/[email protected]/2009-09-10.txt


Thanks,


Matt


const AFSLONGNAMEMAX = 512;

/* XXX a conceptual directory may be of other types, in future, such
 * as stream directory */
const AFS_FS_DIRENTRY = 1;

struct AFSFSDirEntry {
       AFSFid Fid;
       afs_uint32 Flags;
       string LegacyName<AFSNAMEMAX>;
       string WShortName<AFSNAMEMAX>;
       string UnicodeName<AFSLONGNAMEMAX>;
};

union AFSDirEntry switch (afs_uint32 Entry_Type) {
      case AFS_FS_DIRENTRY:
           AFSDirEntry;
};

/* Max length of one segment of a directory listing,
 * which may be arbitrarily large */

const AFSDIRSEQMAX = 512;
typedef AFSDirEntry AFSDirEntrySeq<AFSDIRSEQMAX>;

proc FetchDirectory(
     IN AFSFid *DirFid,
     afs_uint32 Offset,
     OUT afs_uint64 NEntries,
     AFSDirEntrySeq *Entries,
     AFSFetchStatus *OutStatus,
     AFSCallBack *CallBack,
     AFSVolSync *Sync
} = AFS_FETCH_DIRECTORY_ORD;


-- 

Matt Benjamin

The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309

_______________________________________________
AFS3-standardization mailing list
[email protected]
http://michigan-openafs-lists.central.org/mailman/listinfo/afs3-standardization

Reply via email to