1. 16 7月, 2015 1 次提交
    • M
      dm thin: stay in out-of-data-space mode once no_space_timeout expires · bcc696fa
      Mike Snitzer 提交于
      This fixes an issue where running out of data space would cause the
      thin-pool's metadata to become read-only.  There was no reason to make
      metadata read-only -- calling set_pool_mode() with PM_READ_ONLY was a
      misguided way to error all queued and future write IOs.  We can
      accomplish the same by degrading from PM_OUT_OF_DATA_SPACE to
      PM_OUT_OF_DATA_SPACE with error_if_no_space enabled.
      
      Otherwise, the use of PM_READ_ONLY could cause a race where commit() was
      started before the PM_READ_ONLY transition but dm_pool_commit_metadata()
      would go on to fail because the block manager had transitioned to
      read-only.  The return of -EPERM from dm_pool_commit_metadata(), due to
      attempting to commit while in read-only mode, caused the thin-pool to
      set 'needs_check' because a metadata_operation_failed().  This needless
      cascade of failures makes life for users more difficult than needed.
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      bcc696fa
  2. 13 7月, 2015 1 次提交
    • M
      dm: fix use after free crash due to incorrect cleanup sequence · b06075a9
      Mikulas Patocka 提交于
      Linux 4.2-rc1 Commit 0f20972f ("dm: factor out a common
      cleanup_mapped_device()") moved a common cleanup code to a separate
      function.  Unfortunately, that commit incorrectly changed the order of
      cleanup, so that it destroys the mapped_device's srcu structure
      'io_barrier' before destroying its workqueue.
      
      The function that is executed on the workqueue (dm_wq_work) uses the srcu
      structure, thus it may use it after being freed.  That results in a
      crash in the LVM test suite's mirror-vgreduce-removemissing.sh test.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Fixes: 0f20972f ("dm: factor out a common cleanup_mapped_device()")
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      b06075a9
  3. 09 7月, 2015 1 次提交
  4. 06 7月, 2015 5 次提交
  5. 05 7月, 2015 32 次提交