Re: [f2fs-dev] [PATCH v5 2/9] block: Add encryption context to struct bio

2019-10-31 Thread Christoph Hellwig
> +static int num_prealloc_crypt_ctxs = 128; Where does that magic number come from? > +struct bio_crypt_ctx *bio_crypt_alloc_ctx(gfp_t gfp_mask) > +{ > + return mempool_alloc(bio_crypt_ctx_pool, gfp_mask); > +} > +EXPORT_SYMBOL(bio_crypt_alloc_ctx); This isn't used by an modular code. >

[f2fs-dev] [PATCH v5 2/9] block: Add encryption context to struct bio

2019-10-28 Thread Satya Tangirala via Linux-f2fs-devel
We must have some way of letting a storage device driver know what encryption context it should use for en/decrypting a request. However, it's the filesystem/fscrypt that knows about and manages encryption contexts. As such, when the filesystem layer submits a bio to the block layer, and this bio