Lines Matching defs:entry
126 /* Corrupt entry. Our process might have been killed before we
140 /* Corrupt entry. Our process might have been killed before we
159 struct foz_db_entry *entry = ralloc(foz_db->mem_ctx,
161 entry->header = *header;
162 entry->file_idx = file_idx;
163 _mesa_sha1_hex_to_sha1(entry->key, hash_str);
165 /* Truncate the entry's hash string to a 64bit hash for use with a
171 entry->offset = cache_offset;
173 _mesa_hash_table_u64_insert(foz_db->index_db, key, entry);
361 /* Here we lookup a cache entry in the index hash table. If an entry is found
362 * we use the retrieved offset to read the cache entry from disk.
377 struct foz_db_entry *entry =
379 if (!entry) {
381 entry = _mesa_hash_table_u64_search(foz_db->index_db, hash);
383 if (!entry) {
388 uint8_t file_idx = entry->file_idx;
389 if (fseek(foz_db->file[file_idx], entry->offset, SEEK_SET) < 0)
393 if (fread(&entry->header, 1, header_size, foz_db->file[file_idx]) !=
401 if (cache_key_160bit[i] != entry->key[i])
405 uint32_t data_sz = entry->header.payload_size;
411 if (entry->header.crc != 0) {
412 if (util_hash_crc32(data, data_sz) != entry->header.crc)
426 /* reading db entry failed. reset the file offset */
432 /* Here we write the cache entry to disk and store its offset in the index db.
458 struct foz_db_entry *entry =
460 if (entry) {
467 /* Prepare db entry header and blob ready for writing */
485 /* Write db entry header */
489 /* Now write the db entry blob */
517 entry = ralloc(foz_db->mem_ctx, struct foz_db_entry);
518 entry->header = header;
519 entry->offset = offset;
520 entry->file_idx = 0;
521 _mesa_sha1_hex_to_sha1(entry->key, hash_str);
522 _mesa_hash_table_u64_insert(foz_db->index_db, hash, entry);