Re: [PATCH] fix an integer overflow in __blkdev_sectors_to_bio_pages

2017-08-14 Thread Damien Le Moal
On 8/15/17 09:01, Mikulas Patocka wrote: > > > On Mon, 14 Aug 2017, Damien Le Moal wrote: > >> On Sun, 2017-08-13 at 22:47 -0400, Mikulas Patocka wrote: >>> >>> On Wed, 9 Aug 2017, h...@lst.de wrote: >>> Does commit 615d22a51c04856efe62af6e1d5b450aaf5cc2c0 "block: Fix

Re: [PATCH] Revert "scsi: default to scsi-mq"

2017-08-14 Thread Martin K. Petersen
Christoph, > Defaulting to scsi-mq in 4.13-rc has shown various regressions > on setups that we didn't previously consider. Fixes for them are > in progress, but too invasive to make it in this cycle. So for > now revert the commit that defaults to blk-mq for SCSI. For 4.14 > we'll plan to

Re: [PATCH] blk-mq: Fix queue usage on failed request allocation

2017-08-14 Thread Ming Lei
On Mon, Aug 14, 2017 at 04:40:11PM -0400, Keith Busch wrote: > blk_mq_get_request() does not release the callers queue usage counter > when allocation fails. The caller still needs to account for its own > queue usage when it is unable to allocate a request. > > Fixes: 1ad43c0078b7 ("blk-mq:

[PATCH RESEND] blk-throttle: fix potential NULL pointer dereference in throtl_select_dispatch

2017-08-14 Thread Joseph Qi
From: Joseph Qi Since throtl_rb_first may return NULL, so it should check tg first and then use it. Signed-off-by: Joseph Qi --- block/blk-throttle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] fix an integer overflow in __blkdev_sectors_to_bio_pages

2017-08-14 Thread Mikulas Patocka
On Mon, 14 Aug 2017, Damien Le Moal wrote: > On Sun, 2017-08-13 at 22:47 -0400, Mikulas Patocka wrote: > > > > On Wed, 9 Aug 2017, h...@lst.de wrote: > > > > > Does commit 615d22a51c04856efe62af6e1d5b450aaf5cc2c0 > > > "block: Fix __blkdev_issue_zeroout loop" fix the issue for you? > > > > >

[PATCH V2 6/9] nullb: support discard

2017-08-14 Thread Shaohua Li
From: Shaohua Li discard makes sense for memory backed disk. And also it's useful to test if upper layer supports dicard correctly. User configures 'discard' attribute to enable/disable dicard support. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh

[PATCH V2 5/9] nullb: support memory backed store

2017-08-14 Thread Shaohua Li
From: Shaohua Li This adds memory backed store in nullb. User configure 'memory_backed' attribute for this. By default, nullb disk doesn't use memory backed store. Based on original patch from Kyungchan Koh Signed-off-by: Kyungchan Koh Signed-off-by: Shaohua Li

[PATCH V2 7/9] nullb: bandwidth control

2017-08-14 Thread Shaohua Li
From: Shaohua Li In test, we usually expect controllable disk speed. For example, in a raid array, we'd like some disks are fast and some are slow. MD RAID actually has a feature for this. To test the feature, we'd like to make the disk run in specific speed. block throttling

[PATCH V2 0/9] nullb: extend nullb for destructive tests

2017-08-14 Thread Shaohua Li
From: Shaohua Li In testing software RAID, I usually found it's hard to cover specific cases. RAID is supposed to work even disk is in semi good state, for example, some sectors are broken. Since we can't control the behavior of hardware, it's difficult to create test suites to do

[PATCH V2 3/9] nullb: add interface to power on disk

2017-08-14 Thread Shaohua Li
From: Shaohua Li The device created in nullb configfs interface isn't power on by default. After user configures the device, user can do 'echo 1 > xxx/nullb/device_name/power' to power on the device, which will create a disk. the xxx/nullb/device_name/index is the disk index, so if

[PATCH V2 8/9] nullb: emulate cache

2017-08-14 Thread Shaohua Li
From: Shaohua Li Software must flush disk cache to guarantee data safety. To check if software correctly does disk cache flush, we must know the behavior of disk. But physical disk behavior is uncontrollable. Even software doesn't do the flush, the disk probably does the flush. This

[PATCH V2 9/9] nullb: badbblocks support

2017-08-14 Thread Shaohua Li
From: Shaohua Li Sometime disk could have tracks broken and data there is inaccessable, but data in other parts can be accessed in normal way. MD RAID supports such disks. But we don't have a good way to test it, because we can't control which part of a physical disk is bad. For a

[PATCH V2 2/9] nullb: add configfs interface

2017-08-14 Thread Shaohua Li
From: Shaohua Li Add configfs interface for nullb. configfs interface is more flexible and easy to configure in a per-disk basis. Configuration is something like this: mount -t configfs none /mnt Checking which features the driver supports: cat /mnt/nullb/features The 'features'

[PATCH V2 4/9] nullb: use ida to manage index

2017-08-14 Thread Shaohua Li
From: Shaohua Li We now dynamically create disks. Managing the disk index with ida to avoid bump up the index too much. Signed-off-by: Shaohua Li --- drivers/block/null_blk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-14 Thread Benjamin Block
On Sun, Aug 13, 2017 at 04:39:40PM +0200, Christoph Hellwig wrote: > On Fri, Aug 11, 2017 at 06:01:42PM +0200, Benjamin Block wrote: > > When the BSG interface is used with bsg-lib, and the user sends a > > Bidirectional command - so when he gives an input- and output-buffer > > (most users of our

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-14 Thread Benjamin Block
Hey Christoph, I looked over the patch in detail, see below. > From f5b03b82df0569c035022c1c2535696186907f1a Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Fri, 11 Aug 2017 11:03:29 +0200 > Subject: bsg-lib: allocate sense data for each request > > Since we split the

Re: [PATCH] Revert "scsi: default to scsi-mq"

2017-08-14 Thread Dave Kleikamp
On 08/13/2017 12:44 PM, Christoph Hellwig wrote: > Defaulting to scsi-mq in 4.13-rc has shown various regressions > on setups that we didn't previously consider. Fixes for them are > in progress, but too invasive to make it in this cycle. So for > now revert the commit that defaults to blk-mq

Re: [PATCH] Revert "scsi: default to scsi-mq"

2017-08-14 Thread Bart Van Assche
On Sun, 2017-08-13 at 19:44 +0200, Christoph Hellwig wrote: > Defaulting to scsi-mq in 4.13-rc has shown various regressions > on setups that we didn't previously consider. Fixes for them are > in progress, but too invasive to make it in this cycle. So for > now revert the commit that defaults

[RFC] block: deprecate choosing elevator via boot param

2017-08-14 Thread Oleksandr Natalenko
Setting I/O scheduler via kernel command line is not flexible enough anymore. Different schedulers might be desirable for different types of devices (SSDs and HDDs, for instance). Moreover, setting elevator while using blk-mq framework does not work in this way already. This commit enables

Re: [PATCH] Revert "scsi: default to scsi-mq"

2017-08-14 Thread Hannes Reinecke
On 08/13/2017 07:44 PM, Christoph Hellwig wrote: > Defaulting to scsi-mq in 4.13-rc has shown various regressions > on setups that we didn't previously consider. Fixes for them are > in progress, but too invasive to make it in this cycle. So for > now revert the commit that defaults to blk-mq