- Most attention this cycle went to optimizing blk-mq request-based DM
  (dm-mq) that is used exclussively by DM multipath.

  - A stable fix for dm-mq that eliminates excessive context switching
    offers the biggest performance improvement (for both IOPs and
    throughput).

  - But more work is needed, during the next cycle, to reduce spinlock
    contention in DM multipath on large NUMA systems.

- A stable fix for a NULL pointer seen when DM stats is enabled on a DM
  multipath device that must requeue an IO due to path failure.

- A stable fix for DM snapshot to disallow the COW and origin devices
  from being identical.  This amounts to graceful failure in the face of
  userspace error because these devices shouldn't ever be identical.

- Stable fixes for DM cache and DM thin provisioning to address crashes
  seen if/when their respective metadata device experiences failures
  that cause the transition to 'fail_io' mode.

- The DM cache 'mq' policy is now an alias for the 'smq' policy.  The
  'smq' policy proved to be consistently better than 'mq'.  As such
  'mq', with all its complex user-facing tunables, has been eliminated.

- Improve DM thin provisioning to consistently return -ENOSPC once the
  thin-pool's data volume is out of space.

- Improve DM core to properly handle error propagation if
  bio_integrity_clone() fails in clone_bio().

- Other small cleanups and improvements to DM core.
dm: fix rq_end_stats() NULL pointer in dm_requeue_original_request()

An "old" (.request_fn) DM 'struct request' stores a pointer to the
associated 'struct dm_rq_target_io' in rq->special.

dm_requeue_original_request(), previously named
dm_requeue_unmapped_original_request(), called dm_unprep_request() to
reset rq->special to NULL.  But rq_end_stats() would go on to hit a NULL
pointer deference because its call to tio_from_request() returned NULL.

Fix this by calling rq_end_stats() _before_ dm_unprep_request()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Fixes: e262f34741 ("dm stats: add support for request-based DM devices")
Cc: stable@vger.kernel.org # 4.2+
1 file changed