Lines Matching defs:bio

10  * as part of the bio, instead of the filesystem doing the crypto itself via
250 * fscrypt_set_bio_crypt_ctx() - prepare a file contents bio for inline crypto
251 * @bio: a bio which will eventually be submitted to the file
258 * encryption, then assign the appropriate encryption context to the bio.
260 * Normally the bio should be newly allocated (i.e. no pages added yet), as
263 * The encryption context will be freed automatically when the bio is freed.
265 void fscrypt_set_bio_crypt_ctx(struct bio *bio, const struct inode *inode,
276 bio_crypt_set_ctx(bio, ci->ci_enc_key.blk_key, dun, gfp_mask);
305 * fscrypt_set_bio_crypt_ctx_bh() - prepare a file contents bio for inline
307 * @bio: a bio which will eventually be submitted to the file
314 void fscrypt_set_bio_crypt_ctx_bh(struct bio *bio,
322 fscrypt_set_bio_crypt_ctx(bio, inode, first_lblk, gfp_mask);
327 * fscrypt_mergeable_bio() - test whether data can be added to a bio
328 * @bio: the bio being built up
332 * When building a bio which may contain data which should undergo inline
334 * to ensure that the resulting bio contains only contiguous data unit numbers.
336 * bio because either the encryption key would be different or the encryption
339 * fscrypt_set_bio_crypt_ctx() must have already been called on the bio.
347 bool fscrypt_mergeable_bio(struct bio *bio, const struct inode *inode,
350 const struct bio_crypt_ctx *bc = bio->bi_crypt_context;
367 return bio_crypt_dun_is_contiguous(bc, bio->bi_iter.bi_size, next_dun);
372 * fscrypt_mergeable_bio_bh() - test whether data can be added to a bio
373 * @bio: the bio being built up
381 bool fscrypt_mergeable_bio_bh(struct bio *bio,
388 return !bio->bi_crypt_context;
390 return fscrypt_mergeable_bio(bio, inode, next_lblk);
443 * Determine the limit to the number of blocks that can be submitted in a bio
452 * so that the wraparound doesn't occur in the middle of a bio, which would