1. 20 Jul, 2016 3 commits
  2. 14 Jul, 2016 1 commit
  3. 13 Jul, 2016 1 commit
  4. 12 Jul, 2016 10 commits
    • Keith Busch's avatar
      nvme: Limit command retries · f80ec966
      Keith Busch authored
      Many controller implementations will return errors to commands that will
      not succeed, but without the DNR bit set. The driver previously retried
      these commands an unlimited number of times until the command timeout
      has exceeded, which takes an unnecessarilly long period of time.
      This patch limits the number of retries a command can have, defaulting
      to 5, but is user tunable at load or runtime.
      The struct request's 'retries' field is used to track the number of
      retries attempted. This is in contrast with scsi's use of this field,
      which indicates how many retries are allowed.
      Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Minfei Huang's avatar
      loop: Make user notify for adding loop device failed · 7a649737
      Minfei Huang authored
      There is no error number returned if loop driver fails in function
      alloc_disk to add new loop device. Add a correct error number to make
      user notify in this case.
      Signed-off-by: default avatarMinfei Huang <mnghuan@gmail.com>
      Reviewed-by: default avatarMing Lei <tom.leiming@gmail.com>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Arnd Bergmann's avatar
      nvme-loop: fix nvme-loop Kconfig dependencies · 6eae8c45
      Arnd Bergmann authored
      I ran into the same problem on NVME_TARGET_RDMA now,
      which otherwise needs dependencies on both CONFIG_BLOCK and
          warning: (NVME_TARGET_LOOP && NVME_TARGET_RDMA) selects NVME_TARGET which has unmet direct dependencies (BLOCK && CONFIGFS_FS)
          0xA002B368 Mon Jul 11 18:00:45 CEST 2016 failed
          In file included from ../drivers/nvme/target/core.c:16:0:
          drivers/nvme/target/nvmet.h:222:14: error: field 'inline_bio' has incomplete type
            struct bio  inline_bio;
          drivers/nvme/target/core.c: In function 'nvmet_async_event_work':
          drivers/nvme/target/core.c:98:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
          ../drivers/nvme/target/core.c: In function 'nvmet_ns_enable':
          ../drivers/nvme/target/core.c:269:13: error: implicit declaration of function 'blkdev_get_by_path' [-Werror=implicit-function-declaration]
            ns->bdev = blkdev_get_by_path(ns->device_path, FMODE_READ | FMODE_WRITE,
      Folding in my patch below should address that too.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Wei Yongjun's avatar
      nvmet: fix return value check in nvmet_subsys_alloc() · 69555af2
      Wei Yongjun authored
      In case of error, the function kstrndup() returns NULL pointer
      not ERR_PTR(). The IS_ERR() test in the return value check
      should be replaced with NULL test.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Reviewed-by: default avatarJay Freyensee <james_p_freyensee@linux.intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Ming Lin's avatar
      nvme-fabrics: add-remove ctrl repeat fix · e76debd9
      Ming Lin authored
      Repeatedly adding then removing the same NVMe-over-Fabrics controller
      over and over again (shown below) can cause a kernel crash (also shown
      below).  This patch fixes that.
      [nvmf]# ./setup_nvme_connections.sh
      -nqn,hostnqn=evil-wins-nqn,nr_io_queues=16 > /dev/nvme-fabrics
      -nqn,hostnqn=good-wins-nqn > /dev/nvme-fabrics
      [nvmf]# ./remove_nvme_connections.sh 2
      echo 1 > /sys/class/nvme/nvme0/delete_controller
      echo 1 > /sys/class/nvme/nvme1/delete_controller
      [nvmf]# ./setup_nvme_connections.sh
      -nqn,hostnqn=evil-wins-nqn,nr_io_queues=16 > /dev/nvme-fabrics
      [nvmf]# dmesg
      [  313.416908] nvme nvme0: creating 16 I/O queues.
      [  313.523908] nvme nvme0: new ctrl: NQN "darkside-nqn", addr
      [  313.524857] BUG: unable to handle kernel NULL pointer dereference at
      [  313.525262] IP: [<ffffffff8136c60e>] strcmp+0xe/0x30
      [  313.525490] PGD 0
      [  313.525726] Oops: 0000 [#1] SMP
      [  313.525900] Modules linked in: nvme_rdma nvme_fabrics nvme_core
      ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_en
      mlx4_ib ib_core mlx4_core
      [  313.527085] CPU: 15 PID: 5856 Comm: setup_nvme_conn Not tainted
      4.7.0-rc2+ #2
      [  313.527259] Hardware name: Supermicro X9DRT-F/IBQF/IBFF/X9DRT
      -F/IBQF/IBFF, BIOS 1.0a 10/09/2012
      [  313.527551] task: ffff88027646cd40 ti: ffff88025b980000 task.ti:
      [  313.527879] RIP: 0010:[<ffffffff8136c60e>]  [<ffffffff8136c60e>]
      [  313.528232] RSP: 0018:ffff88025b983db0  EFLAGS: 00010206
      [  313.528403] RAX: 0000000000000000 RBX: ffff880471879880 RCX:
      [  313.528594] RDX: 0000000000000000 RSI: ffff880474afa860 RDI:
      [  313.528778] RBP: ffff88025b983db0 R08: ffff880474afa860 R09:
      [  313.528956] R10: 000000000000002c R11: ffff88047f415000 R12:
      [  313.529129] R13: ffff880471879000 R14: ffff880474afa860 R15:
      [  313.529303] FS:  00007f778f510700(0000) GS:ffff88047fbc0000(0000)
      [  313.529629] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  313.529817] CR2: 0000000000000010 CR3: 0000000274174000 CR4:
      [  313.529989] Stack:
      [  313.530154]  ffff88025b983e48 ffffffffa0171c74 0000000000000001
      [  313.530621]  ffff880476f32400 ffff88047e8add80 0000010074b33aa0
      [  313.531162]  ffff88047187904b ffff880471879058 0000000000000000
      [  313.531629] Call Trace:
      [  313.531797]  [<ffffffffa0171c74>] nvmf_dev_write+0x674/0x840
      [  313.531974]  [<ffffffff81180b53>] __vfs_write+0x23/0x120
      [  313.532146]  [<ffffffff8119daff>] ? __fd_install+0x1f/0xc0
      [  313.532316]  [<ffffffff8119d97a>] ? __alloc_fd+0x3a/0x170
      [  313.532487]  [<ffffffff811811f3>] vfs_write+0xb3/0x1b0
      [  313.532658]  [<ffffffff8117e321>] ? filp_close+0x51/0x70
      [  313.532845]  [<ffffffff811824e1>] SyS_write+0x41/0xa0
      [  313.533016]  [<ffffffff8183055b>]
      [  313.533188] Code: 80 3a 00 75 f7 48 83 c6 01 0f b6 4e ff 48 83 c2 01
      84 c9 88 4a ff 75 ed 5d c3 0f 1f 00 55 48 89 e5 eb 04 84 c0 74 18 48 83
      c7 01 <0f> b6 47 ff 48 83 c6 01 3a 46 ff 74 eb 19 c0 83 c8 01 5d c3 31
      [  313.536563] RIP  [<ffffffff8136c60e>] strcmp+0xe/0x30
      [  313.536815]  RSP <ffff88025b983db0>
      [  313.536981] CR2: 0000000000000010
      [  313.537151] ---[ end trace 3d952e590e7bc2d5 ]---
      Reported-and-tested-by: default avatarJay Freyensee <james.p.freyensee@intel.com>
      Signed-off-by: default avatarMing Lin <mlin@kernel.org>
      Signed-off-by: default avatarJay Freyensee <james.p.freyensee@intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Sagi Grimberg's avatar
      nvme-fabrics: Remove tl_retry_count · 6a92967c
      Sagi Grimberg authored
      The timeout before error recovery logic kicks in is
      dictated by the nvme keep-alive, so we don't really need
      a transport layer retry count. transports can retry for
      as much as they like.
      Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Sagi Grimberg's avatar
      nvme-rdma: Don't use tl_retry_count · 2ac17c28
      Sagi Grimberg authored
      Always use the maximum qp retry count as the
      error recovery timeout is dictated from the nvme
      Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Wei Yongjun's avatar
      nvme-rdma: fix the return value of nvme_rdma_reinit_request() · 458a9632
      Wei Yongjun authored
      PTR_ERR should be applied before its argument is reassigned, otherwise the
      return value will be set to 0, not error code.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Reviewed-by: default avatarJay Freyensee <james_p_freyensee@linux.intel.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • vchannaiah's avatar
      cdrom: support read sub-channel command in LBA format · bf294e83
      vchannaiah authored
      userspace application can send READ_SUB_CHANNEL command with time bit
      enabled and disabled. The time bit allows selection of address reporting
      format. If the time bit is disabled the response is in logical block
      address(CDROM_LBA) format, represented as a 32-bit integer with ms-byte
      first. If the time bit is enabled the response is in time format i.e.,
      minutes, second, frame (CDROM_MSF) format.
      Signed-off-by: default avatarvchannaiah <vanitha.channaiah@in.bosch.com>
      Signed-off-by: default avatarMahendran Kuppusamy <mahendran.kuppusamy@in.bosch.com>
      [veeraiyan.chidambaram@in.bosch.com: updated Documentation/ioctl/cdrom.txt]
      Signed-off-by: default avatarVeeraiyan Chidambaram <veeraiyan.chidambaram@in.bosch.com>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    • Guilherme G. Piccoli's avatar
      nvme/quirk: Add a delay before checking for adapter readiness · 54adc010
      Guilherme G. Piccoli authored
      When disabling the controller, the specification says the register
      NVME_REG_CC should be written and then driver needs to wait the
      adapter to be ready, which is checked by reading another register
      bit (NVME_CSTS_RDY). There's a timeout validation in this checking,
      so in case this timeout is reached the driver gives up and removes
      the adapter from the system.
      After a firmware activation procedure, the PCI_DEVICE(0x1c58, 0x0003)
      (HGST adapter) end up being removed if we issue a reset_controller,
      because driver keeps verifying the NVME_REG_CSTS until the timeout is
      reached. This patch adds a necessary quirk for this adapter, by
      introducing a delay before nvme_wait_ready(), so the reset procedure
      is able to be completed. This quirk is needed because just increasing
      the timeout is not enough in case of this adapter - the driver must
      wait before start reading NVME_REG_CSTS register on this specific
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
  5. 08 Jul, 2016 6 commits
  6. 07 Jul, 2016 19 commits