1. 19 Jun, 2017 4 commits
    • Mikulas Patocka's avatar
      dm ioctl: report event number in DM_LIST_DEVICES · 23d70c5e
      Mikulas Patocka authored
      Report the event numbers for all the devices, so that the user doesn't
      have to ask them one by one.  The event number is reported after the
      name field in the dm_name_list structure.
      
      The location of the next record is specified in the dm_name_list->next
      field, that means that we can put the new data after the end of name and
      it is backward compatible with the old code.  The old code just skips
      the event number without interpreting it.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      23d70c5e
    • Mikulas Patocka's avatar
      dm ioctl: add a new DM_DEV_ARM_POLL ioctl · fc1841e1
      Mikulas Patocka authored
      This ioctl will record the current global event number in the structure
      dm_file, so that next select or poll call will wait until new events
      arrived since this ioctl.
      
      The DM_DEV_ARM_POLL ioctl has the same effect as closing and reopening
      the handle.
      
      Using the DM_DEV_ARM_POLL ioctl is optional - if the userspace is OK
      with closing and reopening the /dev/mapper/control handle after select
      or poll, there is no need to re-arm via ioctl.
      
      Usage:
      1. open the /dev/mapper/control device
      2. send the DM_DEV_ARM_POLL ioctl
      3. scan the event numbers of all devices we are interested in and process
         them
      4. call select, poll or epoll on the handle (it waits until some new event
         happens since the DM_DEV_ARM_POLL ioctl)
      5. go to step 2
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      fc1841e1
    • Mikulas Patocka's avatar
      dm: add basic support for using the select or poll function · 93e6442c
      Mikulas Patocka authored
      Add the ability to poll on the /dev/mapper/control device.  The select
      or poll function waits until any event happens on any dm device since
      opening the /dev/mapper/control device.  When select or poll returns the
      device as readable, we must close and reopen the device to wait for new
      dm events.
      
      Usage:
      1. open the /dev/mapper/control device
      2. scan the event numbers of all devices we are interested in and process
         them
      3. call select, poll or epoll on the handle (it waits until some new event
         happens since opening the device)
      4. close the /dev/mapper/control handle
      5. go to step 1
      
      The next commit allows to re-arm the polling without closing and
      reopening the device.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      93e6442c
    • Ming Lei's avatar
      nvme: host: unquiesce queue in nvme_kill_queues() · 443bd90f
      Ming Lei authored
      When nvme_kill_queues() is run, queues may be in
      quiesced state, so we forcibly unquiesce queues to avoid
      blocking dispatch, and I/O hang can be avoided in
      remove path.
      
      Peviously we use blk_mq_start_stopped_hw_queues() as
      counterpart of blk_mq_quiesce_queue(), now we have
      introduced blk_mq_unquiesce_queue(), so use it explicitly.
      
      Cc: linux-nvme@lists.infradead.org
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      443bd90f
  2. 18 Jun, 2017 33 commits
  3. 16 Jun, 2017 3 commits