[dm-devel] [PATCH v2] dm mpath: maintain reference count for underlying devices

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Mon Sep 19 06:49:12 UTC 2011


Hi Mike,

On 09/16/11 22:59, Mike Snitzer wrote:
> When processing a request, DM-mpath's map_io() set the cloned request's
> request_queue to the appropriate underlying device's request_queue
> without getting a reference on that request_queue.
> 
> DM-mpath now maintains a reference count on the underlying devices'
> request_queue.  This change wasn't motivated by a specific report but
> code, like blk_insert_cloned_request(), will access the request_queue
> with the understanding that the request_queue is valid.

Umm, I think it doesn't make sense.

DM opens underlying devices and it should be sufficient to keep
request_queue from being freed.
If it was not enough, any other openers would have to get the reference
count, too, and that should be done in more generic place.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation




More information about the dm-devel mailing list