Re: [PATCH 1/2] blk-mq: add callback of .cleanup_rq

2019-07-19 Thread Mike Snitzer
On Thu, Jul 18 2019 at 9:35pm -0400, Ming Lei wrote: > On Thu, Jul 18, 2019 at 10:52:01AM -0400, Mike Snitzer wrote: > > On Wed, Jul 17 2019 at 11:25pm -0400, > > Ming Lei wrote: > > > > > dm-rq needs to free request which has been dispatched and not completed > > > by underlying queue. Howeve

Re: [PATCH 1/2] blk-mq: add callback of .cleanup_rq

2019-07-18 Thread Ming Lei
On Thu, Jul 18, 2019 at 10:52:01AM -0400, Mike Snitzer wrote: > On Wed, Jul 17 2019 at 11:25pm -0400, > Ming Lei wrote: > > > dm-rq needs to free request which has been dispatched and not completed > > by underlying queue. However, the underlying queue may have allocated > > private stuff for thi

Re: [PATCH 1/2] blk-mq: add callback of .cleanup_rq

2019-07-18 Thread Mike Snitzer
On Wed, Jul 17 2019 at 11:25pm -0400, Ming Lei wrote: > dm-rq needs to free request which has been dispatched and not completed > by underlying queue. However, the underlying queue may have allocated > private stuff for this request in .queue_rq(), so dm-rq will leak the > request private part.

[PATCH 1/2] blk-mq: add callback of .cleanup_rq

2019-07-17 Thread Ming Lei
dm-rq needs to free request which has been dispatched and not completed by underlying queue. However, the underlying queue may have allocated private stuff for this request in .queue_rq(), so dm-rq will leak the request private part. Add one new callback of .cleanup_rq() to fix the memory leak iss