Lines Matching refs:k
453 void bch_bucket_free(struct cache_set *c, struct bkey *k) in bch_bucket_free() argument
457 for (i = 0; i < KEY_PTRS(k); i++) in bch_bucket_free()
458 __bch_bucket_free(PTR_CACHE(c, k, i), in bch_bucket_free()
459 PTR_BUCKET(c, k, i)); in bch_bucket_free()
463 struct bkey *k, int n, bool wait) in __bch_bucket_alloc_set() argument
470 bkey_init(k); in __bch_bucket_alloc_set()
481 k->ptr[i] = PTR(ca->buckets[b].gen, in __bch_bucket_alloc_set()
485 SET_KEY_PTRS(k, i + 1); in __bch_bucket_alloc_set()
490 bch_bucket_free(c, k); in __bch_bucket_alloc_set()
491 bkey_put(c, k); in __bch_bucket_alloc_set()
496 struct bkey *k, int n, bool wait) in bch_bucket_alloc_set() argument
500 ret = __bch_bucket_alloc_set(c, reserve, k, n, wait); in bch_bucket_alloc_set()
571 bool bch_alloc_sectors(struct cache_set *c, struct bkey *k, unsigned sectors, in bch_alloc_sectors() argument
588 while (!(b = pick_data_bucket(c, k, write_point, &alloc.key))) { in bch_alloc_sectors()
615 k->ptr[i] = b->key.ptr[i]; in bch_alloc_sectors()
619 SET_KEY_OFFSET(k, KEY_OFFSET(k) + sectors); in bch_alloc_sectors()
620 SET_KEY_SIZE(k, sectors); in bch_alloc_sectors()
621 SET_KEY_PTRS(k, KEY_PTRS(&b->key)); in bch_alloc_sectors()
628 bkey_copy_key(&b->key, k); in bch_alloc_sectors()
689 struct task_struct *k = kthread_run(bch_allocator_thread, in bch_cache_allocator_start() local
691 if (IS_ERR(k)) in bch_cache_allocator_start()
692 return PTR_ERR(k); in bch_cache_allocator_start()
694 ca->alloc_thread = k; in bch_cache_allocator_start()