[GIT PULL] nvme fixes for 4.20

2018-11-01 Thread Christoph Hellwig
The following changes since commit a5185607787e030fcb0009194d3b12f8bcca59d6: block: brd: associate with queue until adding disk (2018-10-31 08:43:09 -0600) are available in the Git repository at: git://git.infradead.org/nvme.git nvme-4.20 for you to fetch changes up to ae172db3b3f389c363ec7

Re: [PATCH v9] virtio_blk: add discard and write zeroes support

2018-11-01 Thread Stefan Hajnoczi
On Thu, Nov 01, 2018 at 03:40:35PM -0700, Daniel Verkamp wrote: > From: Changpeng Liu > > In commit 88c85538, "virtio-blk: add discard and write zeroes features > to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio > block specification has been extended to add VIRTIO_BLK_T_D

Re: [PATCH V2] block: brd: associate with queue until adding disk

2018-11-01 Thread Jens Axboe
On 11/1/18 6:50 PM, Ming Lei wrote: > brd_free() may be called in failure path on one brd instance which > disk isn't added yet, so release handler of gendisk may free the > associated request_queue early and causes the following use-after-free[1]. > > This patch fixes this issue by associating ge

Re: [LKP] a518560778 [ 16.132179] BUG: KASAN: null-ptr-deref in brd_alloc

2018-11-01 Thread Jens Axboe
On 11/1/18 6:53 PM, Ming Lei wrote: > On Fri, Nov 02, 2018 at 08:19:57AM +0800, kernel test robot wrote: >> Greetings, >> >> 0day kernel testing robot got the below dmesg and the first bad commit is >> >> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git >> for-linus >> >> comm

Re: [LKP] a518560778 [ 16.132179] BUG: KASAN: null-ptr-deref in brd_alloc

2018-11-01 Thread Ming Lei
On Fri, Nov 02, 2018 at 08:19:57AM +0800, kernel test robot wrote: > Greetings, > > 0day kernel testing robot got the below dmesg and the first bad commit is > > https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git > for-linus > > commit a5185607787e030fcb0009194d3b12f8bcca59d6

[PATCH V2] block: brd: associate with queue until adding disk

2018-11-01 Thread Ming Lei
brd_free() may be called in failure path on one brd instance which disk isn't added yet, so release handler of gendisk may free the associated request_queue early and causes the following use-after-free[1]. This patch fixes this issue by associating gendisk with request_queue just before adding di

Re: [PATCH v9] virtio_blk: add discard and write zeroes support

2018-11-01 Thread Dongli Zhang
Hi Daniel, Other than crosvm, is there any version of qemu (e.g., repositories developed in progress on github) where I can try with this feature? Thank you very much! Dongli Zhang On 11/02/2018 06:40 AM, Daniel Verkamp wrote: > From: Changpeng Liu > > In commit 88c85538, "virtio-blk: add dis

Re: [PATCH] blkcg: revert blkcg cleanups series

2018-11-01 Thread Jens Axboe
On 11/1/18 3:24 PM, Dennis Zhou wrote: > This reverts a series committed earlier due to null pointer exception > bug report in [1]. It seems there are edge case interactions that I did > not consider and will need some time to understand what causes the > adverse interactions. > > The original ser

Re: [PATCH 06/16] blk-mq: add 'type' attribute to the sysfs hctx directory

2018-11-01 Thread Jens Axboe
On 11/1/18 3:59 PM, Omar Sandoval wrote: > On Tue, Oct 30, 2018 at 12:32:42PM -0600, Jens Axboe wrote: >> It can be useful for a user to verify what type a given hardware >> queue is, expose this information in sysfs. >> >> Reviewed-by: Hannes Reinecke >> Reviewed-by: Bart Van Assche >> Signed-of

Re: [PATCH 0/2] loop: Better discard for block devices

2018-11-01 Thread Gwendal Grignou
On Thu, Nov 1, 2018 at 11:15 AM Evan Green wrote: > > On Tue, Oct 30, 2018 at 4:50 PM Bart Van Assche wrote: > > > > On Tue, 2018-10-30 at 16:06 -0700, Evan Green wrote: > > > This series addresses some errors seen when using the loop > > > device directly backed by a block device. The first chan

[PATCH v9] virtio_blk: add discard and write zeroes support

2018-11-01 Thread Daniel Verkamp
From: Changpeng Liu In commit 88c85538, "virtio-blk: add discard and write zeroes features to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio block specification has been extended to add VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES commands. This patch enables support

Re: [PATCH 21/30] block: remove dead elevator code

2018-11-01 Thread Jens Axboe
On 11/1/18 3:26 PM, Omar Sandoval wrote: > On Wed, Oct 31, 2018 at 11:59:13AM -0600, Jens Axboe wrote: >> This removes a bunch of core and elevator related code. On the core >> front, we remove anything related to queue running, draining, >> initialization, plugging, and congestions. We also kill a

Re: [PATCH 09/30] scsi: kill off the legacy IO path

2018-11-01 Thread Jens Axboe
On 11/1/18 3:11 PM, Omar Sandoval wrote: >> -if ((ql2x_ini_mode == QLA2XXX_INI_MODE_ENABLED) && >> -shost_use_blk_mq(host)) { >> -mq = true; >> +if (ql2x_ini_mode == QLA2XXX_INI_MODE_ENABLED) >> startit = true; >> -

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-11-01 Thread Daniel Verkamp
On Thu, Nov 1, 2018 at 2:25 PM Michael S. Tsirkin wrote: > > On Mon, Oct 29, 2018 at 05:05:21AM +, Stefan Hajnoczi wrote: > > On Fri, Oct 26, 2018 at 10:47:16AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > > > > On Fri, Oct 12, 2018

Re: [PATCH 06/16] blk-mq: add 'type' attribute to the sysfs hctx directory

2018-11-01 Thread Omar Sandoval
On Tue, Oct 30, 2018 at 12:32:42PM -0600, Jens Axboe wrote: > It can be useful for a user to verify what type a given hardware > queue is, expose this information in sysfs. > > Reviewed-by: Hannes Reinecke > Reviewed-by: Bart Van Assche > Signed-off-by: Jens Axboe > --- > block/blk-mq-sysfs.c

Re: [PATCHSET v3 0/30] blk-mq driver conversions and legacy path removal

2018-11-01 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 11:58:52AM -0600, Jens Axboe wrote: > This patch series converts the remaining drivers to blk-mq. SCSI > supports both paths, this removes the legacy IO path from SCSI. At the > end, legacy IO code and schedulers are killed off. > > I'm not aware of any issues with this ser

Re: [PATCH 21/30] block: remove dead elevator code

2018-11-01 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 11:59:13AM -0600, Jens Axboe wrote: > This removes a bunch of core and elevator related code. On the core > front, we remove anything related to queue running, draining, > initialization, plugging, and congestions. We also kill anything > related to request allocation, mergi

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-11-01 Thread Michael S. Tsirkin
On Mon, Oct 29, 2018 at 05:05:21AM +, Stefan Hajnoczi wrote: > On Fri, Oct 26, 2018 at 10:47:16AM -0400, Michael S. Tsirkin wrote: > > On Fri, Oct 26, 2018 at 09:08:38AM +0100, Stefan Hajnoczi wrote: > > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > > > + r

[PATCH] blkcg: revert blkcg cleanups series

2018-11-01 Thread Dennis Zhou
This reverts a series committed earlier due to null pointer exception bug report in [1]. It seems there are edge case interactions that I did not consider and will need some time to understand what causes the adverse interactions. The original series can be found in [2] with a follow up series in

Re: [PATCH 09/30] scsi: kill off the legacy IO path

2018-11-01 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 11:59:01AM -0600, Jens Axboe wrote: > Cc: linux-s...@vger.kernel.org > Acked-by: Himanshu Madhani > Reviewed-by: Hannes Reinecke > Signed-off-by: Jens Axboe A bunch of really trivial nitpicks below, only to prove that I read the thing ;) Reviewed-by: Omar Sandoval > -

loopback block device will not free

2018-11-01 Thread tedheadster
Jens, I am running the latest 4.19 kernel. When I mount a disk image using option 'loop' in /etc/fstab, it mounts just fine. When I un-mount the loopback device, lsof verifies that nothing else is using it. However, losetup -d will not free the device. Also, the reference counts in lsmod show 2

Re: [PATCH RFC] block, bfq: set default slice_idle to zero for non-rotational devices

2018-11-01 Thread Holger Hoffstätte
On 11/01/18 18:43, Konstantin Khlebnikov wrote: With default 8ms idle slice BFQ is up to 10 times slower than CFQ for massive random read workloads for common SATA SSD. For now zero idle slice gives better out of box experience. CFQ employs this since commit 41c0126b3f22 ("block: Make CFQ defaul

Re: [PATCH 0/2] loop: Better discard for block devices

2018-11-01 Thread Evan Green
On Tue, Oct 30, 2018 at 4:50 PM Bart Van Assche wrote: > > On Tue, 2018-10-30 at 16:06 -0700, Evan Green wrote: > > This series addresses some errors seen when using the loop > > device directly backed by a block device. The first change plumbs > > out the correct error message, and the second cha

[PATCH RFC] block, bfq: set default slice_idle to zero for non-rotational devices

2018-11-01 Thread Konstantin Khlebnikov
With default 8ms idle slice BFQ is up to 10 times slower than CFQ for massive random read workloads for common SATA SSD. For now zero idle slice gives better out of box experience. CFQ employs this since commit 41c0126b3f22 ("block: Make CFQ default to IOPS mode on SSDs") Signed-off-by: Konstanti

[PATCH RFC] blk-mq: initialize default elevator after probing device features

2018-11-01 Thread Konstantin Khlebnikov
For SATA and SCSI devices features like rotational/non-rotational flag are detected via requests to VPD pages in asynchronous probe. During probing queue works in bypass mode without using elevator. This patch postpones initialization of elevator to use this information for choosing default elevat

Re: [PATCH blktests] fix discontiguous-io compile error on 32 bit systems

2018-11-01 Thread Bart Van Assche
On Thu, 2018-11-01 at 14:35 +0800, Yufen Yu wrote: > When make discontiguous-io.cpp with -m32, g++ compiler reports > error for std::min(long unsigned int, size_t) has diffent > arguments type. > > fixes: fd21728886e7 ("Add the discontiguous-io test program") > Signed-off-by: Yufen Yu > --- > sr

Re: [PATCHSET v3 0/30] blk-mq driver conversions and legacy path removal

2018-11-01 Thread Jens Axboe
On 10/31/18 8:35 PM, Ming Lei wrote: > On Wed, Oct 31, 2018 at 11:58:52AM -0600, Jens Axboe wrote: >> This patch series converts the remaining drivers to blk-mq. SCSI >> supports both paths, this removes the legacy IO path from SCSI. At the >> end, legacy IO code and schedulers are killed off. >> >

Re: [PATCH 09/16] blk-mq: cache request hardware queue mapping

2018-11-01 Thread Jens Axboe
On 11/1/18 3:27 AM, Hannes Reinecke wrote: > On 10/30/18 7:32 PM, Jens Axboe wrote: >> We call blk_mq_map_queue() a lot, at least two times for each >> request per IO, sometimes more. Since we now have an indirect >> call as well in that function. cache the mapping so we don't >> have to re-call bl

Re: remove exofs and the T10 OSD code V2

2018-11-01 Thread Douglas Gilbert
On 2018-11-01 1:03 a.m., Boaz Harrosh wrote: On 31/10/18 23:10, Douglas Gilbert wrote: On 2018-10-31 4:57 p.m., Boaz Harrosh wrote: On 30/10/18 09:45, Christoph Hellwig wrote: On Mon, Oct 29, 2018 at 02:42:12PM -0600, Jens Axboe wrote: LGTM, for both: I also have this one on top as requeste

Re: [PATCH 11/16] blk-mq: improve plug list sorting

2018-11-01 Thread Hannes Reinecke
On 10/30/18 7:32 PM, Jens Axboe wrote: Currently we only look at the software queue, but with support for multiple maps, we should also look at the hardware queue. This is important since we'll flush out the request list if either the software queue or hardware queue don't match. This sorts by s

Re: [PATCH 10/16] blk-mq: cleanup and improve list insertion

2018-11-01 Thread Hannes Reinecke
On 10/30/18 7:32 PM, Jens Axboe wrote: It's somewhat strange to have a list insertion function that relies on the fact that the caller has mapped things correctly. Pass in the hardware queue directly for insertion, which makes for a much cleaner interface and implementation. Signed-off-by: Jens

Re: [PATCH 09/16] blk-mq: cache request hardware queue mapping

2018-11-01 Thread Hannes Reinecke
On 10/30/18 7:32 PM, Jens Axboe wrote: We call blk_mq_map_queue() a lot, at least two times for each request per IO, sometimes more. Since we now have an indirect call as well in that function. cache the mapping so we don't have to re-call blk_mq_map_queue() for the same request multiple times.