Lines Matching defs:bio

28 static int pblk_read_from_cache(struct pblk *pblk, struct bio *bio,
37 return pblk_rb_copy_to_bio(&pblk->rwb, bio, lba, ppa);
41 struct bio *bio, sector_t blba,
68 if (!pblk_read_from_cache(pblk, bio, lba,
81 * to allow caller to handle the bio
94 bio_advance(bio, PBLK_EXPOSED_PAGE_SIZE);
179 static void pblk_end_user_read(struct bio *bio, int error)
182 bio_io_error(bio);
184 bio_endio(bio);
191 struct bio *int_bio = rqd->bio;
218 struct bio *bio = (struct bio *)r_ctx->private;
220 pblk_end_user_read(bio, rqd->error);
224 static void pblk_read_rq(struct pblk *pblk, struct nvm_rq *rqd, struct bio *bio,
248 if (!pblk_read_from_cache(pblk, bio, lba, ppa)) {
263 void pblk_submit_read(struct pblk *pblk, struct bio *bio)
265 sector_t blba = pblk_get_lba(bio);
266 unsigned int nr_secs = pblk_get_secs(bio);
270 struct bio *int_bio, *split_bio;
273 start_time = bio_start_io_acct(bio);
287 bio_io_error(bio);
292 /* Clone read bio to deal internally with:
296 int_bio = bio_clone_fast(bio, GFP_KERNEL, &pblk_bio_set);
305 r_ctx->private = bio; /* original bio */
306 rqd->bio = int_bio; /* internal bio */
310 pblk_end_user_read(bio, 0);
314 /* The read bio request could be partially filled by the write
320 split_bio = bio_split(bio, nr_secs * NR_PHY_IN_LOG, GFP_KERNEL,
322 bio_chain(split_bio, bio);
323 submit_bio_noacct(bio);
325 /* New bio contains first N sectors of the previous one, so
327 * the number of PPAs in it. New bio is also guaranteed that
331 bio = split_bio;
340 int_bio = bio_clone_fast(bio, GFP_KERNEL, &pblk_bio_set);