Lines Matching refs:dc_job
780 struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) in create_put_job() local
783 if (dc_job) { in create_put_job()
784 dc_job->cache = cache; in create_put_job()
785 memcpy(dc_job->key, key, sizeof(cache_key)); in create_put_job()
786 dc_job->data = dc_job + 1; in create_put_job()
787 memcpy(dc_job->data, data, size); in create_put_job()
788 dc_job->size = size; in create_put_job()
792 dc_job->cache_item_metadata.type = cache_item_metadata->type; in create_put_job()
794 dc_job->cache_item_metadata.num_keys = in create_put_job()
796 dc_job->cache_item_metadata.keys = (cache_key *) in create_put_job()
799 if (!dc_job->cache_item_metadata.keys) in create_put_job()
802 memcpy(dc_job->cache_item_metadata.keys, in create_put_job()
807 dc_job->cache_item_metadata.type = CACHE_ITEM_TYPE_UNKNOWN; in create_put_job()
808 dc_job->cache_item_metadata.keys = NULL; in create_put_job()
812 return dc_job; in create_put_job()
815 free(dc_job); in create_put_job()
824 struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) job; in destroy_put_job() local
825 free(dc_job->cache_item_metadata.keys); in destroy_put_job()
844 struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) job; in cache_put() local
846 filename = get_cache_file(dc_job->cache, dc_job->key); in cache_put()
851 while (*dc_job->cache->size + dc_job->size > dc_job->cache->max_size && in cache_put()
853 evict_lru_item(dc_job->cache); in cache_put()
871 make_cache_file_directory(dc_job->cache, dc_job->key); in cache_put()
908 ret = write_all(fd, dc_job->cache->driver_keys_blob, in cache_put()
909 dc_job->cache->driver_keys_blob_size); in cache_put()
919 ret = write_all(fd, &dc_job->cache_item_metadata.type, in cache_put()
926 if (dc_job->cache_item_metadata.type == CACHE_ITEM_TYPE_GLSL) { in cache_put()
927 ret = write_all(fd, &dc_job->cache_item_metadata.num_keys, in cache_put()
934 ret = write_all(fd, dc_job->cache_item_metadata.keys[0], in cache_put()
935 dc_job->cache_item_metadata.num_keys * in cache_put()
947 cf_data.crc32 = util_hash_crc32(dc_job->data, dc_job->size); in cache_put()
948 cf_data.uncompressed_size = dc_job->size; in cache_put()
961 size_t file_size = deflate_and_write_to_disk(dc_job->data, dc_job->size, in cache_put()
980 p_atomic_add(dc_job->cache->size, sb.st_blocks * 512); in cache_put()
999 struct disk_cache_put_job *dc_job = in disk_cache_put() local
1002 if (dc_job) { in disk_cache_put()
1003 util_queue_fence_init(&dc_job->fence); in disk_cache_put()
1004 util_queue_add_job(&cache->cache_queue, dc_job, &dc_job->fence, in disk_cache_put()