1. 22 Dec, 2015 1 commit
    • Christoph Hellwig's avatar
      block: defer timeouts to a workqueue · 287922eb
      Christoph Hellwig authored
      Timer context is not very useful for drivers to perform any meaningful abort
      action from.  So instead of calling the driver from this useless context
      defer it to a workqueue as soon as possible.
      
      Note that while a delayed_work item would seem the right thing here I didn't
      dare to use it due to the magic in blk_add_timer that pokes deep into timer
      internals.  But maybe this encourages Tejun to add a sensible API for that to
      the workqueue API and we'll all be fine in the end :)
      
      Contains a major update from Keith Bush:
      
      "This patch removes synchronizing the timeout work so that the timer can
       start a freeze on its own queue. The timer enters the queue, so timer
       context can only start a freeze, but not wait for frozen."
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarKeith Busch <keith.busch@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      287922eb
  2. 09 Dec, 2015 2 commits
  3. 08 Dec, 2015 1 commit
    • Arnd Bergmann's avatar
      nvme: fix another 32-bit build warning · d1ea7be5
      Arnd Bergmann authored
      The nvme_user_cmd function was recently moved around from one file
      to another, which made a warning reappear that I had fixed before
      at some point:
      
      drivers/nvme/host/core.c: In function 'nvme_user_cmd':
      drivers/nvme/host/core.c:424:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      
      This applies the same workaround that we have elsewhere in the
      driver with an extra type cast to uintptr_t.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 1673f1f0 ("nvme: move block_device_operations and ns/ctrl freeing to common code")
      Link: https://lkml.org/lkml/2015/10/9/611Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      d1ea7be5
  4. 03 Dec, 2015 2 commits
    • Christoph Hellwig's avatar
      NVMe: fix build with CONFIG_NVM enabled · ac02ddde
      Christoph Hellwig authored
      Looks like I didn't test with CONFIG_NVM enabled, and neither did
      the build bot.
      
      Most of this is really weird crazy shit in the lighnvm support, though.
      
      Struct nvme_ns is a structure for the NVM I/O command set, and it has
      no business poking into it.  Second this commit:
      
      commit 47b3115a
      Author: Wenwei Tao <ww.tao0320@gmail.com>
      Date:   Fri Nov 20 13:47:55 2015 +0100
      
          nvme: lightnvm: use admin queues for admin cmds
      
      Does even more crazy stuff.  If a function gets a request_queue parameter
      passed it'd better use that and not look for another one.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      ac02ddde
    • Keith Busch's avatar
      blk-integrity: empty implementation when disabled · 06c1e390
      Keith Busch authored
      This patch moves the blk_integrity_payload definition outside the
      CONFIG_BLK_DEV_INTERITY dependency and provides empty function
      implementations when the kernel configuration disables integrity
      extensions. This simplifies drivers that make use of these to map user
      data so they don't need to repeat the same configuration checks.
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      
      Updated by Jens to pass an error pointer return from
      bio_integrity_alloc(), otherwise if CONFIG_BLK_DEV_INTEGRITY isn't
      set, we return a weird ENOMEM from __nvme_submit_user_cmd()
      if a meta buffer is set.
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      06c1e390
  5. 01 Dec, 2015 23 commits
  6. 25 Nov, 2015 1 commit
    • Jens Axboe's avatar
      Revert "blk-flush: Queue through IO scheduler when flush not required" · d7cf931d
      Jens Axboe authored
      This reverts commit 1b2ff19e.
      
      Jan writes:
      
      --
      
      Thanks for report! After some investigation I found out we allocate
      elevator specific data in __get_request() only for non-flush requests. And
      this is actually required since the flush machinery uses the space in
      struct request for something else. Doh. So my patch is just wrong and not
      easy to fix since at the time __get_request() is called we are not sure
      whether the flush machinery will be used in the end. Jens, please revert
      1b2ff19e. Thanks!
      
      I'm somewhat surprised that you can reliably hit the race where flushing
      gets disabled for the device just while the request is in flight. But I
      guess during boot it makes some sense.
      
      --
      
      So let's just revert it, we can fix the queue run manually after the
      fact. This race is rare enough that it didn't trigger in testing, it
      requires the specific disable-while-in-flight scenario to trigger.
      d7cf931d
  7. 24 Nov, 2015 10 commits