diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-01-31 23:22:27 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-02-22 17:06:22 +0100 |
commit | 16f122661dbb3dfefc60788b528b54ad702005aa (patch) | |
tree | 500f1868d0342e7d61eeb86337d0120532d37d78 /drivers/md/dm.h | |
parent | dm: set DM_TARGET_WILDCARD feature on "error" target (diff) | |
download | linux-16f122661dbb3dfefc60788b528b54ad702005aa.tar.xz linux-16f122661dbb3dfefc60788b528b54ad702005aa.zip |
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>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 53df2585571b..4305a513c801 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -73,6 +73,7 @@ int dm_table_resume_targets(struct dm_table *t); int dm_table_any_congested(struct dm_table *t, int bdi_bits); unsigned dm_table_get_type(struct dm_table *t); struct target_type *dm_table_get_immutable_target_type(struct dm_table *t); +struct dm_target *dm_table_get_immutable_target(struct dm_table *t); struct dm_target *dm_table_get_wildcard_target(struct dm_table *t); bool dm_table_request_based(struct dm_table *t); bool dm_table_mq_request_based(struct dm_table *t); |