1 / 7

Coda Directory Handling

Coda Directory Handling. Peter J Braam. Data Structures. Directory contents: DIR api Directory handles: DH api Directory inodes: DI api Directory handle cache: DC api Fid support: FID api. Directory contents. Blob of data -- size multiple of 2048 bytes

yachi
Télécharger la présentation

Coda Directory Handling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Coda Directory Handling Peter J Braam

  2. Data Structures • Directory contents: DIR api • Directory handles: DH api • Directory inodes: DI api • Directory handle cache: DC api • Fid support: FID api

  3. Directory contents • Blob of data -- size multiple of 2048 bytes • Contains names and NDirFids (vnode, uniq) in network order • Contains freemap, hashtable and other organizational structure • Contents stored contiguously in Venus RVM, by page in server RVM

  4. Directory Handles • Contain pointers, lock and refcounts • Stored in VM in the server in hash table • Stored in RVM in client, pointed to by fsobjs as part of VenusDirData. • Most operations on directories go through the DH api. • Server has a DH cache -- needed for Copy on Write refcounting.

  5. Dir Inodes • Contain a page map for directory pages in server RVM • Routines for retrieving and storing DH’s in DI’s and vice versa • Copy routine • Guts of server directory data storage

  6. Lookup • Lookup maps name to inode number • Lookup must go from kernel to Venus through venus_lookup upcall • Mostly lookup uses inode number computed from FID • Root directory of volume is assigned inode number of mount point by Venus

  7. Readdir • Readdir needs a Unix file hande (directory handle) • Upon open of a directory Venus writes out a BSD formatted directory container file • File contains only names, no inode numbers or types (POSIX says this is all we need).

More Related