Lines Matching refs:index
42 * Directories are sorted, and can contain a directory index to speed up
44 * storing the index/filename mapping to the first directory header
46 * and at lookup the index is scanned linearly looking for the first filename
49 * The general idea of the index is ensure only one metadata block needs to be
69 * Lookup name in the directory index, returning the location of the metadata
70 * block containing it, and the directory index this represents.
72 * If we get an error reading the index then return the part of the index
73 * (if any) we have managed to read - the index isn't essential, just
83 struct squashfs_dir_index *index;
88 index = kmalloc(sizeof(*index) + SQUASHFS_NAME_LEN * 2 + 2, GFP_KERNEL);
89 if (index == NULL) {
94 str = &index->name[SQUASHFS_NAME_LEN + 1];
99 err = squashfs_read_metadata(sb, index, &index_start,
100 &index_offset, sizeof(*index));
105 size = le32_to_cpu(index->size) + 1;
107 err = squashfs_read_metadata(sb, index->name, &index_start,
112 index->name[size] = '\0';
114 if (strcmp(index->name, str) > 0)
117 length = le32_to_cpu(index->index);
118 *next_block = le32_to_cpu(index->start_block) +
123 kfree(index);
127 * Return index (f_pos) of the looked up metadata block. Translate