Lines Matching refs:pblk
20 int pblk_write_to_cache(struct pblk *pblk, struct bio *bio, unsigned long flags) in pblk_write_to_cache() argument
22 struct request_queue *q = pblk->dev->q; in pblk_write_to_cache()
31 &pblk->disk->part0); in pblk_write_to_cache()
38 ret = pblk_rb_may_write_user(&pblk->rwb, bio, nr_entries, &bpos); in pblk_write_to_cache()
44 pblk_pipeline_stop(pblk); in pblk_write_to_cache()
52 pblk_write_kick(pblk); in pblk_write_to_cache()
63 pos = pblk_rb_wrap_pos(&pblk->rwb, bpos + i); in pblk_write_to_cache()
64 pblk_rb_write_entry_user(&pblk->rwb, data, w_ctx, pos); in pblk_write_to_cache()
69 atomic64_add(nr_entries, &pblk->user_wa); in pblk_write_to_cache()
72 atomic_long_add(nr_entries, &pblk->inflight_writes); in pblk_write_to_cache()
73 atomic_long_add(nr_entries, &pblk->req_writes); in pblk_write_to_cache()
76 pblk_rl_inserted(&pblk->rl, nr_entries); in pblk_write_to_cache()
79 generic_end_io_acct(q, REQ_OP_WRITE, &pblk->disk->part0, start_time); in pblk_write_to_cache()
80 pblk_write_should_kick(pblk); in pblk_write_to_cache()
88 int pblk_write_gc_to_cache(struct pblk *pblk, struct pblk_gc_rq *gc_rq) in pblk_write_gc_to_cache() argument
100 if (!pblk_rb_may_write_gc(&pblk->rwb, gc_rq->secs_to_gc, &bpos)) { in pblk_write_gc_to_cache()
114 pos = pblk_rb_wrap_pos(&pblk->rwb, bpos + valid_entries); in pblk_write_gc_to_cache()
115 pblk_rb_write_entry_gc(&pblk->rwb, data, w_ctx, gc_rq->line, in pblk_write_gc_to_cache()
125 atomic64_add(valid_entries, &pblk->gc_wa); in pblk_write_gc_to_cache()
128 atomic_long_add(valid_entries, &pblk->inflight_writes); in pblk_write_gc_to_cache()
129 atomic_long_add(valid_entries, &pblk->recov_gc_writes); in pblk_write_gc_to_cache()
132 pblk_write_should_kick(pblk); in pblk_write_gc_to_cache()