• Home
  • Raw
  • Download

Lines Matching refs:dc_job

246    struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *)  in create_put_job()  local
249 if (dc_job) { in create_put_job()
250 dc_job->cache = cache; in create_put_job()
251 memcpy(dc_job->key, key, sizeof(cache_key)); in create_put_job()
252 dc_job->data = dc_job + 1; in create_put_job()
253 memcpy(dc_job->data, data, size); in create_put_job()
254 dc_job->size = size; in create_put_job()
258 dc_job->cache_item_metadata.type = cache_item_metadata->type; in create_put_job()
260 dc_job->cache_item_metadata.num_keys = in create_put_job()
262 dc_job->cache_item_metadata.keys = (cache_key *) in create_put_job()
265 if (!dc_job->cache_item_metadata.keys) in create_put_job()
268 memcpy(dc_job->cache_item_metadata.keys, in create_put_job()
273 dc_job->cache_item_metadata.type = CACHE_ITEM_TYPE_UNKNOWN; in create_put_job()
274 dc_job->cache_item_metadata.keys = NULL; in create_put_job()
278 return dc_job; in create_put_job()
281 free(dc_job); in create_put_job()
290 struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) job; in destroy_put_job() local
291 free(dc_job->cache_item_metadata.keys); in destroy_put_job()
304 struct disk_cache_put_job *dc_job = (struct disk_cache_put_job *) job; in cache_put() local
306 filename = disk_cache_get_cache_filename(dc_job->cache, dc_job->key); in cache_put()
311 while (*dc_job->cache->size + dc_job->size > dc_job->cache->max_size && in cache_put()
313 disk_cache_evict_lru_item(dc_job->cache); in cache_put()
321 cf_data.crc32 = util_hash_crc32(dc_job->data, dc_job->size); in cache_put()
322 cf_data.uncompressed_size = dc_job->size; in cache_put()
324 disk_cache_write_item_to_disk(dc_job, &cf_data, filename); in cache_put()
343 struct disk_cache_put_job *dc_job = in disk_cache_put() local
346 if (dc_job) { in disk_cache_put()
347 util_queue_fence_init(&dc_job->fence); in disk_cache_put()
348 util_queue_add_job(&cache->cache_queue, dc_job, &dc_job->fence, in disk_cache_put()
349 cache_put, destroy_put_job, dc_job->size); in disk_cache_put()