Hi Satya,

On Wed, 2019-08-21 at 15:57 +0800, Satya Tangirala wrote:
> @@ -827,16 +839,31 @@ bool blk_rq_merge_ok(struct request *rq, struct bio 
> *bio)
>       if (rq->ioprio != bio_prio(bio))
>               return false;
>  
> +     /* Only merge if the crypt contexts are compatible */
> +     if (!bio_crypt_ctx_compatible(bio, rq->bio))
> +             return false;
> +

Since bio_crypt_ctx_compatible() lacks of consideration of inode, I am
not sure if here may lead to incorrect merge decision, especially for
f2fs which does not allow merging different files.

Thanks,
Stanley

Reply via email to