1. 15 3月, 2016 1 次提交
    • B
      dm: fix rq_end_stats() NULL pointer in dm_requeue_original_request() · 98dbc9c6
      Bryn M. Reeves 提交于
      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: NBryn M. Reeves <bmr@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Fixes: e262f347 ("dm stats: add support for request-based DM devices")
      Cc: stable@vger.kernel.org # 4.2+
      98dbc9c6
  2. 12 3月, 2016 1 次提交
    • M
      dm thin: consistently return -ENOSPC if pool has run out of data space · c3667cc6
      Mike Snitzer 提交于
      Commit 0a927c2f ("dm thin: return -ENOSPC when erroring retry list due
      to out of data space") was a step in the right direction but didn't go
      far enough.
      
      Add a new 'out_of_data_space' flag to 'struct pool' and set it if/when
      the pool runs of of data space.  This fixes cell_error() and
      error_retry_list() to not blindly return -EIO.
      
      We cannot rely on the 'error_if_no_space' feature flag since it is
      transient (in that it can be reset once space is added, plus it only
      controls whether errors are issued, it doesn't reflect whether the
      pool is actually out of space).
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      c3667cc6
  3. 11 3月, 2016 14 次提交
  4. 23 2月, 2016 23 次提交
  5. 22 2月, 2016 1 次提交
    • M
      dm: fix sparse "unexpected unlock" warnings in ioctl code · 956a4025
      Mike Snitzer 提交于
      Rename dm_get_live_table_for_ioctl to dm_grab_bdev_for_ioctl and have it
      do the dm_{get,put}_live_table() rather than split those operations.
      
      The dm_grab_bdev_for_ioctl() callers only care about the block_device
      associated with a singleton DM device so there isn't any need to retain
      a reference to the live DM table.  It is sufficient to:
      1) dm_get_live_table()
      2) bdgrab() the bdev associated with the singleton table's target
      3) dm_put_live_table()
      4) bdput() the bdev
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      956a4025