1. 13 Mar, 2019 15 commits
  2. 12 Mar, 2019 3 commits
  3. 07 Mar, 2019 1 commit
    • Javier González's avatar
      pblk: fix max_io calculation · 9205e449
      Javier González authored
      When calculating the maximun I/O size allowed into the buffer, consider
      the write size (ws_opt) used by the write thread in order to cover the
      case in which, due to flushes, the mem and subm pointers are disaligned
      by (ws_opt - 1). This case currently translates into a stall when
      an I/O of the largest possible size is submitted.
      
      Fixes: f9f9d1ae2c66 ("lightnvm: pblk: prevent stall due to wb threshold")
      Signed-off-by: default avatarJavier González <javier@javigon.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9205e449
  4. 06 Mar, 2019 2 commits
    • Ming Lei's avatar
      block: fix segment calculation for passthrough IO · 05b700ba
      Ming Lei authored
      blk_recount_segments() can be called in bio_add_pc_page() for
      calculating how many segments this bio will has after one page is added
      to this bio. If the resulted segment number is beyond the queue limit,
      the added page will be removed.
      
      The try-and-fix policy requires blk_recount_segments(__blk_recalc_rq_segments)
      to not consider the segment number limit. Unfortunately bvec_split_segs()
      does check this limit, and causes small segment number returned to
      bio_add_pc_page(), then page still may be added to the bio even though
      segment number limit becomes broken.
      
      Fixes this issue by not considering segment number limit when calcualting
      bio's segment number.
      
      Fixes: dcebd755 ("block: use bio_for_each_bvec() to compute multi-page bvec count")
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Omar Sandoval <osandov@fb.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      05b700ba
    • Jens Axboe's avatar
      Merge branch 'stable/for-jens-5.1' of... · e61750c8
      Jens Axboe authored
      Merge branch 'stable/for-jens-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-5.1/block-post
      
      Pull two xen blkback fixes from Konrad.
      
      * 'stable/for-jens-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront
        xen/blkback: add stack variable 'blkif' in connect_ring()
      e61750c8
  5. 02 Mar, 2019 1 commit
  6. 28 Feb, 2019 9 commits
  7. 27 Feb, 2019 3 commits
  8. 24 Feb, 2019 5 commits
  9. 22 Feb, 2019 1 commit
    • Dongli Zhang's avatar
      loop: set GENHD_FL_NO_PART_SCAN after blkdev_reread_part() · 758a58d0
      Dongli Zhang authored
      Commit 0da03cab
      ("loop: Fix deadlock when calling blkdev_reread_part()") moves
      blkdev_reread_part() out of the loop_ctl_mutex. However,
      GENHD_FL_NO_PART_SCAN is set before __blkdev_reread_part(). As a result,
      __blkdev_reread_part() will fail the check of GENHD_FL_NO_PART_SCAN and
      will not rescan the loop device to delete all partitions.
      
      Below are steps to reproduce the issue:
      
      step1 # dd if=/dev/zero of=tmp.raw bs=1M count=100
      step2 # losetup -P /dev/loop0 tmp.raw
      step3 # parted /dev/loop0 mklabel gpt
      step4 # parted -a none -s /dev/loop0 mkpart primary 64s 1
      step5 # losetup -d /dev/loop0
      
      Step5 will not be able to delete /dev/loop0p1 (introduced by step4) and
      there is below kernel warning message:
      
      [  464.414043] __loop_clr_fd: partition scan of loop0 failed (rc=-22)
      
      This patch sets GENHD_FL_NO_PART_SCAN after blkdev_reread_part().
      
      Fixes: 0da03cab ("loop: Fix deadlock when calling blkdev_reread_part()")
      Signed-off-by: default avatarDongli Zhang <dongli.zhang@oracle.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      758a58d0