]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm: optimize dm_mq_queue_rq()
authorMike Snitzer <snitzer@redhat.com>
Sun, 31 Jan 2016 22:22:27 +0000 (17:22 -0500)
committerMike Snitzer <snitzer@redhat.com>
Mon, 22 Feb 2016 16:06:22 +0000 (11:06 -0500)
commit16f122661dbb3dfefc60788b528b54ad702005aa
tree500f1868d0342e7d61eeb86337d0120532d37d78
parentf083b09b7819c785db4f82a81f68da3bccfb04bf
dm: optimize dm_mq_queue_rq()

DM multipath is the only dm-mq target.  But that aside, request-based DM
only supports tables with a single target that is immutable.  Leverage
this fact in dm_mq_queue_rq() by using the 'immutable_target' stored in
the mapped_device when the table was made active.  This saves the need
to even take the read-side of the SRCU via dm_{get,put}_live_table.

If the active DM table does not have an immutable target (e.g. "error"
target was swapped in) then fallback to the slow-path where the target
is looked up from the live table.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/md/dm.h