Re: [PATCH v2 1/4] blk-mq: release crypto keyslot before reporting I/O complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 13, 2023 at 02:26:00PM -0700, Nathan Huckleberry wrote:
> > diff --git a/block/blk-merge.c b/block/blk-merge.c
> > index 6460abdb2426..65e75efa9bd3 100644
> > --- a/block/blk-merge.c
> > +++ b/block/blk-merge.c
> > @@ -867,6 +867,8 @@ static struct request *attempt_merge(struct request_queue *q,
> >         if (!blk_discard_mergable(req))
> >                 elv_merge_requests(q, req, next);
> >
> > +       blk_crypto_rq_put_keyslot(next);
> > +
> 
> This looks good to me, but it looks like there was a pre-existing bug
> in the blk-merge code. The elv_merged_request function is only called
> when the request does not merge. Does anyone know if that behavior is
> correct?

That's very confusing to me too!

I did notice that attempt_merge() calls elv_merge_requests() (not to be confused
with elv_merged_request()) if it merges the requests.

So it seems there is elv_merge_requests() which means the request was merged,
and elv_merged_request() which means the request was *not* merged...  I have no
idea what is going on there :-(
	
> This patch itself looks good to me.
> 
> Reviewed-by: Nathan Huckleberry <nhuck@xxxxxxxxxx>

Thanks.

Jens, Christoph, etc., anyone else want to take a look too?

- Eric



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux