1. 27 10月, 2017 1 次提交
  2. 25 10月, 2017 1 次提交
  3. 10 10月, 2017 1 次提交
    • J
      nbd: don't set the device size until we're connected · 639812a1
      Josef Bacik 提交于
      A user reported a regression with using the normal ioctl interface on
      newer kernels.  This happens because I was setting the device size
      before the device was actually connected, which caused us to error out
      and close everything down.  This didn't happen on netlink because we
      hold the device lock the whole time we're setting things up, but we
      don't do that for the ioctl path.  This fixes the problem.
      
      Cc: stable@vger.kernel.org
      Fixes: 29eaadc0 ("nbd: stop using the bdev everywhere")
      Signed-off-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      639812a1
  4. 09 10月, 2017 1 次提交
  5. 04 10月, 2017 2 次提交
  6. 03 10月, 2017 1 次提交
    • J
      nbd: fix -ERESTARTSYS handling · 6e60a3bb
      Josef Bacik 提交于
      Christoph made it so that if we return'ed BLK_STS_RESOURCE whenever we
      got ERESTARTSYS from sending our packets we'd return BLK_STS_OK, which
      means we'd never requeue and just hang.  We really need to return the
      right value from the upper layer.
      
      Fixes: fc17b653 ("blk-mq: switch ->queue_rq return value to blk_status_t")
      Signed-off-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      6e60a3bb
  7. 25 9月, 2017 3 次提交
    • O
      loop: remove union of use_aio and ref in struct loop_cmd · e5313c14
      Omar Sandoval 提交于
      When the request is completed, lo_complete_rq() checks cmd->use_aio.
      However, if this is in fact an aio request, cmd->use_aio will have
      already been reused as cmd->ref by lo_rw_aio*. Fix it by not using a
      union. On x86_64, there's a hole after the union anyways, so this
      doesn't make struct loop_cmd any bigger.
      
      Fixes: 92d77332 ("block/loop: fix use after free")
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      e5313c14
    • J
      nbd: ignore non-nbd ioctl's · 1dae69be
      Josef Bacik 提交于
      In testing we noticed that nbd would spew if you ran a fio job against
      the raw device itself.  This is because fio calls a block device
      specific ioctl, however the block layer will first pass this back to the
      driver ioctl handler in case the driver wants to do something special.
      Since the device was setup using netlink this caused us to spew every
      time fio called this ioctl.  Since we don't have special handling, just
      error out for any non-nbd specific ioctl's that come in.  This fixes the
      spew.
      Signed-off-by: NJosef Bacik <jbacik@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1dae69be
    • M
      brd: fix overflow in __brd_direct_access · 02a48436
      Mikulas Patocka 提交于
      The code in __brd_direct_access multiplies the pgoff variable by page size
      and divides it by 512. It can cause overflow on 32-bit architectures. The
      overflow happens if we create ramdisk larger than 4G and use it as a
      sparse device.
      
      This patch replaces multiplication and division with multiplication by the
      number of sectors per page.
      Reviewed-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Fixes: 1647b9b9 ("brd: add dax_operations support")
      Cc: stable@vger.kernel.org	# 4.12+
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      02a48436
  8. 09 9月, 2017 1 次提交
  9. 07 9月, 2017 12 次提交
  10. 02 9月, 2017 2 次提交
  11. 01 9月, 2017 6 次提交
  12. 30 8月, 2017 9 次提交