Lines Matching defs:index
29 * Directories are sorted, and can contain a directory index to speed up
31 * storing the index/filename mapping to the first directory header
33 * and at lookup the index is scanned linearly looking for the first filename
36 * The general idea of the index is ensure only one metadata block needs to be
56 * Lookup name in the directory index, returning the location of the metadata
57 * block containing it, and the directory index this represents.
59 * If we get an error reading the index then return the part of the index
60 * (if any) we have managed to read - the index isn't essential, just
71 struct squashfs_dir_index *index;
76 index = kmalloc(sizeof(*index) + SQUASHFS_NAME_LEN * 2 + 2, GFP_KERNEL);
77 if (index == NULL) {
82 str = &index->name[SQUASHFS_NAME_LEN + 1];
87 err = squashfs_read_metadata(sb, index, &index_start,
88 &index_offset, sizeof(*index));
93 size = le32_to_cpu(index->size) + 1;
97 err = squashfs_read_metadata(sb, index->name, &index_start,
102 index->name[size] = '\0';
104 if (strcmp(index->name, str) > 0)
107 length = le32_to_cpu(index->index);
108 *next_block = le32_to_cpu(index->start_block) +
113 kfree(index);
117 * Return index (f_pos) of the looked up metadata block. Translate