• Home
  • Raw
  • Download

Lines Matching refs:bio

101 void bio_crypt_set_ctx(struct bio *bio, const struct blk_crypto_key *key,  in bio_crypt_set_ctx()  argument
117 bio->bi_crypt_context = bc; in bio_crypt_set_ctx()
121 void __bio_crypt_free_ctx(struct bio *bio) in __bio_crypt_free_ctx() argument
123 mempool_free(bio->bi_crypt_context, bio_crypt_ctx_pool); in __bio_crypt_free_ctx()
124 bio->bi_crypt_context = NULL; in __bio_crypt_free_ctx()
127 int __bio_crypt_clone(struct bio *dst, struct bio *src, gfp_t gfp_mask) in __bio_crypt_clone()
156 void __bio_crypt_advance(struct bio *bio, unsigned int bytes) in __bio_crypt_advance() argument
158 struct bio_crypt_ctx *bc = bio->bi_crypt_context; in __bio_crypt_advance()
205 bool bio_crypt_rq_ctx_compatible(struct request *rq, struct bio *bio) in bio_crypt_rq_ctx_compatible() argument
207 return bio_crypt_ctx_compatible(rq->crypt_ctx, bio->bi_crypt_context); in bio_crypt_rq_ctx_compatible()
225 static bool bio_crypt_check_alignment(struct bio *bio) in bio_crypt_check_alignment() argument
228 bio->bi_crypt_context->bc_key->crypto_cfg.data_unit_size; in bio_crypt_check_alignment()
232 bio_for_each_segment(bv, bio, iter) { in bio_crypt_check_alignment()
285 bool __blk_crypto_bio_prep(struct bio **bio_ptr) in __blk_crypto_bio_prep()
287 struct bio *bio = *bio_ptr; in __blk_crypto_bio_prep() local
288 const struct blk_crypto_key *bc_key = bio->bi_crypt_context->bc_key; in __blk_crypto_bio_prep()
291 if (WARN_ON_ONCE(!bio_has_data(bio))) { in __blk_crypto_bio_prep()
292 bio->bi_status = BLK_STS_IOERR; in __blk_crypto_bio_prep()
296 if (!bio_crypt_check_alignment(bio)) { in __blk_crypto_bio_prep()
297 bio->bi_status = BLK_STS_IOERR; in __blk_crypto_bio_prep()
305 if (blk_crypto_config_supported_natively(bio->bi_bdev, in __blk_crypto_bio_prep()
315 int __blk_crypto_rq_bio_prep(struct request *rq, struct bio *bio, in __blk_crypto_rq_bio_prep() argument
323 *rq->crypt_ctx = *bio->bi_crypt_context; in __blk_crypto_rq_bio_prep()