2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #if !defined(__AFS_DIR_H)
14 #define AFS_PAGESIZE 2048 /* bytes per page */
15 #define NHASHENT 128 /* entries in the hash tbl */
16 #define MAXPAGES 128 /* max pages in a dir */
17 #define BIGMAXPAGES 1023 /* new big max pages */
18 #define EPP 64 /* dir entries per page */
19 #define LEPP 6 /* log above */
20 /* When this next field changs, it is crucial to modify MakeDir, since the latter is responsible for marking these entries as allocated. Also change the salvager. */
21 #define DHE 12 /* entries in a dir header above a pages header alone. */
27 {/* A file identifier. */
28 afs_int32 vnode; /* file's vnode slot */
29 afs_int32 vunique; /* the slot incarnation number */
33 {/* A page header entry. */
34 unsigned short pgcount; /* number of pages, or 0 if old-style */
35 unsigned short tag; /* 1234 in network byte order */
36 char freecount; /* unused, info in dirHeader structure */
37 char freebitmap[EPP/8];
38 char padding[32-(5+EPP/8)];
42 {/* A directory header object.
43 */struct PageHeader header;
44 char alloMap[MAXPAGES]; /* one byte per 2K page */
45 unsigned short hashTable[NHASHENT];
49 {/* A directory entry */
51 char length; /* currently unused */
58 {/* A directory extension entry. */
63 {/* A page in a directory. */
64 struct DirHeader header;
65 struct DirEntry entry[1];
69 {/* A page in a directory. */
70 struct PageHeader header;
71 struct DirEntry entry[1];
75 * Note that this declaration is seen in both the kernel code and the
76 * user space code. One implementation is in afs/afs_buffer.c; the
77 * other is in dir/buffer.c.
79 extern int DVOffset(void *ap);
81 #endif /* !defined(__AFS_DIR_H) */