- * The name is hashed to a 64-bit value, and the directory entries are sorted
- * by hash value (the hash value can then be used as a cookie for resuming a
- * READDIR call). */
+ * Each directory entry is listed in two indices: dirents is indexed by cookie
+ * and dirhash by name. The cookie is a randomly-assigned 32-bit value, unique
+ * within the directory, that remains unchanged until the entry is deleted. It
+ * is used to provide a stable key for restarting a READDIR call. */