Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-12 Thread Bart Van Assche
On 08/12/2016 02:29 PM, Dan Williams wrote: ...or, for that matter, any block device driver on a bus that supports hotplug? In 4.8 Jens merged the following fix for a crash that was triggered by repeatedly reconfiguring a libnvdimm namespace causing it to destroy and create disks (rapid

Re: [BUG] Deadlock in blk_mq_register_disk error path

2016-08-15 Thread Bart Van Assche
On 08/15/2016 09:01 AM, Jinpu Wang wrote: It's more likely you hit another bug, my colleague Roman fix that: http://www.spinics.net/lists/linux-block/msg04552.html Hello Jinpu, Interesting. However, I see that wrote the following: "Firstly this wrong sequence raises two kernel warnings:

Re: Re: [BUG] Deadlock in blk_mq_register_disk error path

2016-08-15 Thread Bart Van Assche
On 08/02/2016 10:21 AM, Jens Axboe wrote: > On 08/02/2016 06:58 AM, Jinpu Wang wrote: >> Hi Jens, >> >> I found in blk_mq_register_disk, we blk_mq_disable_hotplug which in >> turn mutex_lock(_q_mutex); >> queue_for_each_hw_ctx(q, hctx, i) { >> ret = blk_mq_register_hctx(hctx); >>

Re: [BUG] Deadlock in blk_mq_register_disk error path

2016-08-15 Thread Bart Van Assche
On 08/15/2016 10:15 AM, Jens Axboe wrote: Can you reproduce at will? Would be nice to know if it hit the error case, which is where it would hang. Hello Jens, Unfortunately this hang is only triggered sporadically by my tests. Since about four weeks ago I triggered several thousand

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-15 Thread Bart Van Assche
On 08/14/2016 11:23 AM, Dan Williams wrote: [ adding Bart back to the cc ] On Sun, Aug 14, 2016 at 11:08 AM, Dan Williams wrote: On Sun, Aug 14, 2016 at 10:20 AM, James Bottomley wrote: [..] I like it. I still think the bdi

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-01 Thread Bart Van Assche
On Wed, 2017-02-01 at 09:13 -0800, Jens Axboe wrote: > So that's changing the elevator - did this happen while heavy IO was > going to the drive, or was it idle? Hello Jens, I think I figured out what was going on: * Test 02-mq created scsi-mq SRP paths and multipathd created dm-mq device

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Bart Van Assche
On Wed, 2017-02-01 at 14:05 -0800, Dan Williams wrote: > Warnings of the following form occur because scsi reuses a devt number > while the block layer still has it referenced as the name of the bdi Thanks! Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe fr

Re: split scsi passthrough fields out of struct request V2

2017-02-02 Thread Bart Van Assche
On Thu, 2017-02-02 at 13:33 -0500, Mike Snitzer wrote: > I'll go back over hch's changes to see if I can spot anything. But is > this testing using dm_mod.use_bk_mq=Y or are you testing old .request_fn > dm-multipath? Hello Mike, The srp-test software tests multiple configurations: dm-mq on

Re: split scsi passthrough fields out of struct request V2

2017-02-02 Thread Bart Van Assche
On Thu, 2017-02-02 at 14:13 -0500, Mike Snitzer wrote: > On Thu, Feb 02 2017 at 1:43pm -0500, Bart Van Assche > <bart.vanass...@sandisk.com> wrote: > > On Thu, 2017-02-02 at 13:33 -0500, Mike Snitzer wrote: > > > I'll go back over hch's changes to

Re: [PATCH v3] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-03 Thread Bart Van Assche
On Fri, 2017-02-03 at 19:17 +0100, Johannes Thumshirn wrote: > Forgotten git add? git commit --amend without git add is such a classic > mistake on my side as well :-/ Are you familiar with the -a option of git commit? Just run git commit -a --amend Bart.

block for-next: zram build error

2017-02-02 Thread Bart Van Assche
Hello Jens, I noticed accidentally that with the for-next branch of the block git repository that the zram driver doesn't build anymore: $ make M=drivers/block/zram   LD  drivers/block/zram/built-in.o   CC [M]  drivers/block/zram/zcomp.o   CC [M]  drivers/block/zram/zram_drv.o

Re: split scsi passthrough fields out of struct request V2

2017-02-02 Thread Bart Van Assche
On Thu, 2017-02-02 at 16:10 -0500, Mike Snitzer wrote: > Care to try moving the dm_get(md) at the end of dm_start_request() to > the beginning of dm_start_request() and report back on whether it helps > at all? Hello Mike, Sorry but I don't see how that could make a difference. While we are at

Re: split scsi passthrough fields out of struct request V2

2017-02-02 Thread Bart Van Assche
On Thu, 2017-02-02 at 16:04 -0500, Mike Snitzer wrote: > Any progress on getting this to work without requiring infiniband HW? Hello Mike, Intructions for running these tests over SoftRoCE have been added to the README.md file in https://github.com/bvanassche/srp-test. However, I'm not sure the

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Bart Van Assche
On Tue, 2017-01-31 at 13:58 -0800, Jens Axboe wrote: > Interesting, I'll check this. Doesn't make any sense why the scheduler > would be implicated in that, given how we run completions now. But if > it complains, then something must be up. (reduced CC-list) There is another issue that needs

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-01 Thread Bart Van Assche
On Wed, 2017-02-01 at 09:13 -0800, Jens Axboe wrote: > On 02/01/2017 08:46 AM, Bart Van Assche wrote: > > Thanks for having looked into this. However, after having pulled the latest > > block for-next tree (dbb85b06229f) another lockup was triggered soon (02-sq > > is the n

Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements

2017-02-06 Thread Bart Van Assche
On Tue, 2017-02-07 at 02:23 +, Dexuan Cui wrote: > Any news on this thread? > > The issue is still blocking Linux from booting up normally in my test. :-( > > Have we identified the faulty patch? > If so, at least I can try to revert it to boot up. It's interesting that you have a

[PATCH] block: Update comments that refer to __bio_map_user() and bio_map_user()

2017-02-01 Thread Bart Van Assche
Since __bio_map_user() and bio_map_user() have been removed, update the comments that still refer to these functions. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> References: commit ddad8dd0a162 ("block: use blk_rq_map_user_iov to implement blk_rq_map_user") Cc: C

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-01 Thread Bart Van Assche
On Tue, 2017-01-31 at 22:38 -0800, Jens Axboe wrote: > I think this patch: > > http://git.kernel.dk/cgit/linux-block/commit/?h=for-4.11/block=12d70958a2e8d587acaa51dafd5d6620e00b7543 > > should fix it for you. I just ran into the same thing tonight, testing > an unrelated thing. It's the only

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-02 Thread Bart Van Assche
On Wed, 2017-02-01 at 22:01 +, Bart Van Assche wrote: > However, a new issue shows up sporadically, an issue that I had not yet seen > during any test with a kernel tree from Linus: > > [ 227.613440] general protection fault: [#1] SMP > [ 227.613495] Modules linked in:

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Bart Van Assche
On Mon, 2017-01-30 at 17:38 -0800, Jens Axboe wrote: > That's a known bug in mainline. Pull it into 4.10-rc6, > or use my for-next where everything is already merged. Hello Jens, With your for-next branch (commit c2e60b3a2602) I haven't hit any block layer crashes so far. The only issue I

[PATCH 0/4] Four patches for the blk-mq debugfs code

2017-02-01 Thread Bart Van Assche
Hello Jens, Please consider the four patches in this series for kernel v4.11. Thanks, Bart. Bart Van Assche (4): blk-mq-debugfs: Add missing __acquires() / __releases() annotations blk-mq-debug: Avoid that sparse complains about req_flags_t usage blk-mq-debug: Make show() operations

[PATCH 4/4] blk-mq-debug: Introduce debugfs_create_files()

2017-02-01 Thread Bart Van Assche
Replace the two debugfs_create_file() loops by a call to the new debugfs_create_files() function. Add an empty element at the end of the two attribute arrays such that the array size does not have to be passed to debugfs_create_files(). Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.

[PATCH 3/4] blk-mq-debug: Make show() operations interruptible

2017-02-01 Thread Bart Van Assche
Allow users to interrupt show operations instead of making a user space process unkillable if ownership of q->sysfs_lock cannot be obtained. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Omar Sandoval <osan...@fb.com> --- block/blk-mq

[PATCH 2/4] blk-mq-debug: Avoid that sparse complains about req_flags_t usage

2017-02-01 Thread Bart Van Assche
:54: warning: cast from restricted req_flags_t Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Omar Sandoval <osan...@fb.com> --- block/blk-mq-debugfs.c | 3 ++- block/elevator.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block/blk-mq

[PATCH 1/4] blk-mq-debugfs: Add missing __acquires() / __releases() annotations

2017-02-01 Thread Bart Van Assche
This patch avoids that sparse complains about lock imbalances. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Omar Sandoval <osan...@fb.com> --- block/blk-mq-debugfs.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-deb

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-01 Thread Bart Van Assche
On Wed, 2017-02-01 at 09:13 -0800, Jens Axboe wrote: > So that's changing the elevator - did this happen while heavy IO was > going to the drive, or was it idle? I just ran into an I/O hang while running test 02-sq on top of kernel v4.9.6. I will have a closer look at the dm code to see whether I

Re: [PATCH v2] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Bart Van Assche
On Wed, 2017-02-01 at 11:32 -0800, Dan Williams wrote: > diff --git a/include/linux/genhd.h b/include/linux/genhd.h > index 76f39754e7b0..27e7e12c0c2d 100644 > --- a/include/linux/genhd.h > +++ b/include/linux/genhd.h > @@ -167,6 +167,22 @@ struct blk_integrity { > }; > > #endif /*

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Bart Van Assche
On Tue, 2017-01-31 at 13:34 -0800, Bart Van Assche wrote: > On Mon, 2017-01-30 at 17:38 -0800, Jens Axboe wrote: > > That's a known bug in mainline. Pull it into 4.10-rc6, > > or use my for-next where everything is already merged. > > Hello Jens, > > With y

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-24 Thread Bart Van Assche
On Tue, 2017-01-24 at 09:09 +0100, h...@lst.de wrote: > On Tue, Jan 24, 2017 at 12:33:13AM +0000, Bart Van Assche wrote: > > Do we perhaps need a check before the above memcpy() call whether or not > > sense == NULL? > > Yes, probably. I didn't think of the case where the c

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-23 Thread Bart Van Assche
On Mon, 2017-01-23 at 16:29 +0100, Christoph Hellwig wrote: > @@ -251,11 +251,13 @@ static int __scsi_execute(struct scsi_device *sdev, > const unsigned char *cmd, > * is invalid.  Prevent the garbage from being misinterpreted > * and prevent security leaks by zeroing out the

Re: split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > Hi all, > > this series splits the support for SCSI passthrough commands from the > main struct request used all over the block layer into a separate > scsi_request structure that drivers that want to support SCSI passthough > need to

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-26 Thread Bart Van Assche
On 01/23/2017 07:29 AM, Christoph Hellwig wrote: > +int scsi_cmd_buf_len(struct request *rq) > +{ > + return scsi_req(rq)->cmd_len * 3; > +} > +EXPORT_SYMBOL(scsi_cmd_buf_len); Hello Christoph, Where does the '* 3' come from? I think that deserves a comment. Additionally, this patch

Re: [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > -unsigned char *scsi_alloc_sense_buffer(struct Scsi_Host *shost, gfp_t > gfp_mask, > -   int numa_node) > +static unsigned char *scsi_alloc_sense_buffer(struct Scsi_Host *shost, > +   gfp_t gfp_mask, int numa_node) >  {

Re: [PATCH 14/18] scsi: remove __scsi_alloc_queue

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h > index 8129239..b6e07b5 100644 > --- a/include/scsi/scsi_transport.h > +++ b/include/scsi/scsi_transport.h > @@ -119,4 +119,6 @@

Re: [PATCH 16/18] block/bsg: move queue creation into bsg_setup_queue

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > Simply the boilerplate code needed for bsg nodes a bit. Did you perhaps mean "Simplify"? Anyway, nice work! Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line

Re: Device or HBA level QD throttling creates randomness in sequetial workload

2017-01-30 Thread Bart Van Assche
On Mon, 2017-01-30 at 19:22 +0530, Kashyap Desai wrote: > - if (atomic_inc_return(>fw_outstanding) > > - instance->host->can_queue) { > - atomic_dec(>fw_outstanding); > - return SCSI_MLQUEUE_HOST_BUSY; > - } > + if (atomic_inc_return(>fw_outstanding) > safe_can_queue) {

Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements

2017-01-30 Thread Bart Van Assche
On Wed, 2017-01-18 at 10:48 +0100, Hannes Reinecke wrote: > @@ -1488,26 +1487,13 @@ static unsigned long disk_events_poll_jiffies(struct > gendisk *disk) >  void disk_block_events(struct gendisk *disk) >  { > struct disk_events *ev = disk->ev; > -   unsigned long flags; > -   bool

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-30 Thread Bart Van Assche
On Fri, 2017-01-27 at 09:56 -0700, Jens Axboe wrote: > On 01/27/2017 09:52 AM, Bart Van Assche wrote: > > [ 215.724452] general protection fault: [#1] SMP > > [ 215.725060] Call Trace: > > [ 215.725086] scsi_disk_put+0x2d/0x40 > > [ 215.725110] sd_release+

Re: split scsi passthrough fields out of struct request V2

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > this series splits the support for SCSI passthrough commands from the > main struct request used all over the block layer into a separate > scsi_request structure that drivers that want to support SCSI passthough > need to embedded as

Re: [PATCH v2 03/10] blk-mq: move hctx->dispatch and ctx->rq_list from sysfs to debugfs

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 08:06 -0800, Omar Sandoval wrote: > +static void *hctx_dispatch_start(struct seq_file *m, loff_t *pos) > +{ > + struct blk_mq_hw_ctx *hctx = m->private; > + > + spin_lock(>lock); > + return seq_list_start(>dispatch, *pos); > +} > [ ... ] > +static void

Re: [PATCH v3 05/10] sbitmap: add helpers for dumping to a seq_file

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 14:32 -0800, Omar Sandoval wrote: > From: Omar Sandoval > > This is useful debugging information that will be used in the blk-mq > debugfs directory. > > Reviewed-by: Hannes Reinecke > Signed-off-by: Omar Sandoval > --- >

Re: [PATCH v2 01/10] blk-mq: create debugfs directory tree

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 08:06 -0800, Omar Sandoval wrote: > +   for (i = 0; i < ARRAY_SIZE(blk_mq_debugfs_ctx_attrs); i++) { > +   const struct blk_mq_debugfs_attr *attr; > + > +   attr = _mq_debugfs_ctx_attrs[i]; > +   if (!debugfs_create_file(attr->name,

Re: split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 11:44 -0700, Jens Axboe wrote: > I think this may be my bug - does the below help? Hello Jens, What tree has that patch been generated against? It does not apply cleanly on top of Christoph's tree: $ git checkout hch-block-pc-refactor $ patch -p1 --dry-run -f -s <

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On 01/26/2017 11:01 AM, Jens Axboe wrote: > On 01/26/2017 11:59 AM, h...@lst.de wrote: >> On Thu, Jan 26, 2017 at 11:57:36AM -0700, Jens Axboe wrote: >>> It's against my for-4.11/block, which you were running under Christoph's >>> patches. Maybe he's using an older version? In any case, should be

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 14:12 -0700, Jens Axboe wrote: > On 01/26/2017 02:01 PM, Bart Van Assche wrote: > > On Thu, 2017-01-26 at 13:54 -0700, Jens Axboe wrote: > > > Your call path has blk_get_request() in it, I don't have > > > that in my tree. Is it passing in the righ

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 13:54 -0700, Jens Axboe wrote: > Your call path has blk_get_request() in it, I don't have > that in my tree. Is it passing in the right mask? Hello Jens, There is only one blk_get_request() call in drivers/md/dm-mpath.c and it looks as follows: clone =

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-27 Thread Bart Van Assche
On Thu, 2017-01-26 at 18:22 -0700, Jens Axboe wrote: > What's your boot device? I've been booting this on a variety of setups, > no problems observed. It's booting my laptop, and on SCSI and SATA as > well. What is your root drive? What is the queue depth of it? > Controller? The boot device in

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-27 Thread Bart Van Assche
On Fri, 2017-01-27 at 09:56 -0700, Jens Axboe wrote: > I have no idea what this is, I haven't messed with life time or devices > or queues at all in that branch. The srp-test software passes with kernel v4.9. Something must have changed. I'll see whether I can find some time to look further into

Re: [PATCH 05/18] block: allow specifying size for extra command data

2017-01-27 Thread Bart Van Assche
On Fri, 2017-01-27 at 17:12 +0100, Christoph Hellwig wrote: > On Wed, Jan 25, 2017 at 10:15:55PM -0500, Martin K. Petersen wrote: > > +static void *alloc_request_size(gfp_t gfp_mask, void *data) > > > > I like alloc_request_simple() but alloc_request_size() seems a bit > > contrived. _reserve?

Re: [PATCH 11/18] scsi: remove gfp_flags member in scsi_host_cmd_pool

2017-01-27 Thread Bart Van Assche
_DMA flag to > kmem_cache_alloc. Drop all the infrastructure for doing so. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 05/18] block: allow specifying size for extra command data

2017-01-27 Thread Bart Van Assche
On Fri, 2017-01-27 at 10:26 -0700, Jens Axboe wrote: > On 01/27/2017 10:21 AM, Bart Van Assche wrote: > > On Fri, 2017-01-27 at 17:12 +0100, Christoph Hellwig wrote: > > > On Wed, Jan 25, 2017 at 10:15:55PM -0500, Martin K. Petersen wrote: > > > > +static void *all

Re: [PATCH 06/18] dm: remove incomple BLOCK_PC support

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > DM tries to copy a few fields around for BLOCK_PC requests, but given > that no dm-target ever wires up scsi_cmd_ioctl BLOCK_PC can't actually > be sent to dm. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>--

Re: [PATCH 13/18] scsi: remove scsi_cmd_dma_pool

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > There is no need for GFP_DMA allocations of the scsi_cmnd structures > themselves, all that might be DMAed to or from is the actual payload, > or the sense buffers. Reviewed-by: Bart Van Assche <bart.vanass...

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 17:41 -0700, Jens Axboe wrote: > On 01/26/2017 05:38 PM, Bart Van Assche wrote: > > I see similar behavior with the blk-mq-sched branch of > > git://git.kernel.dk/linux-block.git (git commit ID 0efe27068ecf): > > booting happens much slower than usual a

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 16:50 -0700, Jens Axboe wrote: > Clearly we are missing some requests. How do I setup dm similarly to > you? > > Does it reproduce without Christoph's patchset? Hello Jens, I see similar behavior with the blk-mq-sched branch of git://git.kernel.dk/linux-block.git (git

Re: [PATCH 01/18] block: add a op_is_flush helper

2017-01-26 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > This centralizes the checks for bios that needs to be go into the flush > state machine. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> -- To unsubscribe from this list: send the line "unsubscribe linux-b

Re: [PATCH 02/18] md: cleanup bio op / flags handling in raid1_write_request

2017-01-26 Thread Bart Van Assche
" in the patch description? Anyway: Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 03/18] block: fix elevator init check

2017-01-26 Thread Bart Van Assche
ly pass READ or WRITE, and the low-level code looks at the > possible NULL bio to check for a flush. > > Fix this by allowing to pass any block op and flags, and by checking for > the flush flags in __get_request. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To un

Re: [PATCH 04/18] block: simplify blk_init_allocated_queue

2017-01-26 Thread Bart Van Assche
gt; simplify anything. While we're at it also remove two pointless NULL > assignments, given that the request structure is zeroed on allocation. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>-- To unsubscribe from this list: send the line "unsubscribe linux-block" in

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Bart Van Assche
On Thu, 2017-01-26 at 16:26 -0700, Jens Axboe wrote: > What device is stuck? Is it running with an mq scheduler attached, or > with "none"? > > Would also be great to see the output of /sys/block/*/mq/*/tags and > sched_tags so we can see if they have anything pending. > > From a quick look at

Re: [PATCH v2] scsi: zero per-cmd driver data before each I/O

2017-02-21 Thread Bart Van Assche
d->req)); > + sizeof(*cmd) - sizeof(cmd->req) + dev->host->hostt->cmd_size); > > cmd->device = dev; > cmd->sense_buffer = buf; Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>

Re: [PATCH 12/13] kobject: Export kobject_get_unless_zero()

2017-02-21 Thread Bart Van Assche
On 02/21/2017 09:55 AM, Jan Kara wrote: > Make the function available for outside use and fortify it against NULL > kobject. Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com>

RE: [GIT PULL] Block pull request for- 4.11-rc1

2017-02-20 Thread Bart Van Assche
On 02/19/2017 11:35 PM, Christoph Hellwig wrote: > On Sun, Feb 19, 2017 at 06:15:41PM -0700, Jens Axboe wrote: >> That said, we will look into this again, of course. Christoph, any idea? > > No idea really - this seems so far away from the code touched, and there > are no obvious signs for a

Re: [PATCH] scsi: zero per-cmd driver data before each I/O

2017-02-20 Thread Bart Van Assche
On 02/20/2017 08:52 AM, Christoph Hellwig wrote: > Without this drivers that don't clear the state themselves can see off > effects. For example Hyper-V VMs using the storvsc driver will often > hang during boot due to uncleared Test Unit Ready failures. > > Fixes: e9c787e6 ("scsi: allocate

Re: [GIT PULL] Block pull request for- 4.11-rc1

2017-02-20 Thread Bart Van Assche
On 02/20/2017 08:32 AM, Jens Axboe wrote: > Bart, since you are the only one that can reproduce this, can you just bisect > your way through that series? Hello Jens, I will do that as soon as I'm back in the office (later this week). Bart.

Re: [PATCH 04/13] block: Move bdi_unregister() to del_gendisk()

2017-02-22 Thread Bart Van Assche
On 02/22/2017 01:20 AM, Jan Kara wrote: > On Tue 21-02-17 19:53:29, Bart Van Assche wrote: >> This change looks suspicious to me. There are drivers that create a >> block layer queue but neither call device_add_disk() nor del_gendisk(), >> e.g. drivers/scsi/st.c. Although bdi_

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-24 Thread Bart Van Assche
On Wed, 2017-02-22 at 22:29 +0100, Paolo Valente wrote: > thanks for this second attempt of yours. Although, unfortunately, not > providing some clear indication of the exact cause of your hang (apart > from a possible deadlock), your log helped me notice another bug. > > At any rate, as I have

Re: [GIT PULL] Block pull request for- 4.11-rc1

2017-02-24 Thread Bart Van Assche
On Mon, 2017-02-20 at 09:32 -0700, Jens Axboe wrote: > On 02/20/2017 09:16 AM, Bart Van Assche wrote: > > On 02/19/2017 11:35 PM, Christoph Hellwig wrote: > > > On Sun, Feb 19, 2017 at 06:15:41PM -0700, Jens Axboe wrote: > > > > That said, we will look into this ag

Re: [GIT PULL] Block pull request for- 4.11-rc1

2017-02-24 Thread Bart Van Assche
On Fri, 2017-02-24 at 13:22 -0700, Jens Axboe wrote: > Bart, I pushed a fix here: > > http://git.kernel.dk/cgit/linux-block/commit/?h=for-linus=61febef40bfe8ab68259d8545257686e8a0d91d1 Hello Jens, The same test passes against the kernel I obtained by merging your for-linus branch with the same

RE: [GIT PULL] Block pull request for- 4.11-rc1

2017-02-19 Thread Bart Van Assche
On 02/19/2017 04:11 PM, Jens Axboe wrote: > - Removal of the BLOCK_PC support in struct request, and refactoring of > carrying SCSI payloads in the block layer. This cleans up the code > nicely, and enables us to kill the SCSI specific parts of struct > request, shrinking it down nicely.

Re: [PATCH 04/13] block: Move bdi_unregister() to del_gendisk()

2017-02-21 Thread Bart Van Assche
On 02/21/2017 09:55 AM, Jan Kara wrote: > diff --git a/block/blk-core.c b/block/blk-core.c > index 47104f6a398b..9a901dcfdd5c 100644 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -580,8 +580,6 @@ void blk_cleanup_queue(struct request_queue *q) > q->queue_lock =

Re: [PATCH BUGFIX] block: make elevator_get robust against cross blk/blk-mq choice

2017-02-13 Thread Bart Van Assche
On Mon, 2017-02-13 at 22:01 +0100, Paolo Valente wrote: > -static struct elevator_type *elevator_get(const char *name, bool try_loading) > +static struct elevator_type *elevator_get(const char *name, bool try_loading, > + bool mq_ops) Please choose a better

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-13 Thread Bart Van Assche
On Mon, 2017-02-13 at 22:07 +, Bart Van Assche wrote: > On Mon, 2017-02-13 at 22:07 +0100, Paolo Valente wrote: > > but what do you think about trying this fix? > > Sorry but with ... the same server I used for the previous test still > didn't boot up properly. A scree

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-13 Thread Bart Van Assche
On Mon, 2017-02-13 at 22:07 +0100, Paolo Valente wrote: > but what do you think about trying this fix? Sorry but with ... the same server I used for the previous test still didn't boot up properly. A screenshot is available at https://goo.gl/photos/Za9QVGCNe2BJBwxVA. > Otherwise, if you have no

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On 02/10/2017 08:49 AM, Paolo Valente wrote: >> $ grep '^C.*_MQ_' .config >> CONFIG_BLK_MQ_PCI=y >> CONFIG_MQ_IOSCHED_BFQ=y >> CONFIG_MQ_IOSCHED_DEADLINE=y >> CONFIG_MQ_IOSCHED_NONE=y >> CONFIG_DEFAULT_MQ_BFQ_MQ=y >> CONFIG_DEFAULT_MQ_IOSCHED="bfq-mq" >> CONFIG_SCSI_MQ_DEFAULT=y >>

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: > 2) Enable people to test this first version bfq-mq. Hello Paolo, I installed this version of bfq-mq on a server that boots from a SATA disk. That server boots fine with kernel v4.10-rc7 but not with this tree. The first 30 seconds of the

Re: [WIP PATCHSET 0/4] WIP branch for bfq-mq

2017-02-10 Thread Bart Van Assche
On Tue, 2017-02-07 at 18:24 +0100, Paolo Valente wrote: > [1] https://github.com/Algodev-github/bfq-mq Hello Paolo, That branch includes two changes of the version suffix (EXTRAVERSION in Makefile). Please don't do that but set CONFIG_LOCALVERSION in .config to add a suffix to the kernel

Re: sense handling improvements

2017-02-15 Thread Bart Van Assche
On Wed, 2017-02-15 at 16:04 +0100, Christoph Hellwig wrote: > On Wed, Feb 15, 2017 at 09:19:18AM +0100, Hannes Reinecke wrote: > > On 02/14/2017 08:15 PM, Christoph Hellwig wrote: > > > Hi all, > > > > > > this series is on top of the scsi_request changes in Jens' tree and > > > further improves

Re: [LSF/MM TOPIC] block level event logging for storage media management

2017-01-18 Thread Bart Van Assche
On Wed, 2017-01-18 at 23:34 +, Song Liu wrote: > Media health monitoring is very important for large scale distributed storage > systems. > Traditionally, enterprise storage controllers maintain event logs for > attached storage > devices. However, these controller managed logs do not scale

Re: [PATCH 0/3] Separate zone requests from medium access requests

2017-02-28 Thread Bart Van Assche
On Tue, 2017-02-28 at 17:02 +0100, Christoph Hellwig wrote: > I don't really like this too much - this is too many SCSI specifics > for the block layer to care. Maybe using bios for the zone ops was a > mistake after all, and we should just have operations in struct block_device > instead..

Re: [PATCH 2/3] block: Separate zone requests from medium access requests

2017-02-28 Thread Bart Van Assche
On Tue, 2017-02-28 at 19:25 +0900, Damien Le Moal wrote: > From: Bart Van Assche <bart.vanass...@sandisk.com> > > Use blk_rq_accesses_medium() instead of !blk_rq_is_passthrough() to > ensure that code that is intended for normal medium access requests, > e.g. DISCARD, RE

Re: [PATCH] trivial treewide: Convert dev_set_uevent_suppress argument to bool

2016-09-02 Thread Bart Van Assche
On 09/01/16 17:51, Joe Perches wrote: > On Fri, 2016-09-02 at 00:47 +0000, Bart Van Assche wrote: >> On 09/01/16 13:11, Joe Perches wrote: >>> >>> Assigning an int to a bitfield:1 can lose precision. >>> Change the caller argument uses from 1/0 to true/false.

Re: [PATCH] trivial treewide: Convert dev_set_uevent_suppress argument to bool

2016-09-02 Thread Bart Van Assche
On 09/02/2016 08:41 AM, Joe Perches wrote: On Fri, 2016-09-02 at 13:41 +, Bart Van Assche wrote: On 09/01/16 17:51, Joe Perches wrote: On Fri, 2016-09-02 at 00:47 +, Bart Van Assche wrote: On 09/01/16 13:11, Joe Perches wrote: Assigning an int to a bitfield:1 can lose precision

Re: [PATCH] trivial treewide: Convert dev_set_uevent_suppress argument to bool

2016-09-01 Thread Bart Van Assche
On 09/01/16 13:11, Joe Perches wrote: > Assigning an int to a bitfield:1 can lose precision. > Change the caller argument uses from 1/0 to true/false. Hello Joe, Can you clarify how assigning 0 or 1 to a one-bit bitfield can cause a loss of precision? Thanks, Bart. -- To unsubscribe from

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-29 Thread Bart Van Assche
On 08/14/2016 10:21 AM, James Bottomley wrote: > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index d3e852a..222771d 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -3000,7 +3000,13 @@ static void sd_probe_async(void *data, async_cookie_t > cookie) > } > >

Re: Time to make dynamically allocated devt the default for scsi disks?

2016-08-30 Thread Bart Van Assche
On 08/30/2016 01:43 PM, Dan Williams wrote: I tried running this, but it seems I'm failing to configure my test environment correctly [1], but I'm worried that this "re-parenting the scsi-disk" approach, even if the above warning is addressed, may not be backwards compatible. We now have an

Re: [PATCH 1/3] blk-mq: introduce blk_mq_delay_kick_requeue_list()

2016-09-14 Thread Bart Van Assche
On 09/13/2016 06:01 PM, Mike Snitzer wrote: +void blk_mq_delay_kick_requeue_list(struct request_queue *q, + unsigned long msecs) +{ + kblockd_schedule_delayed_work(>requeue_work, msecs); +} +EXPORT_SYMBOL(blk_mq_delay_kick_requeue_list); Hello Mike, I

Re: [PATCH 1/3] block: remove bio_destructor_t

2016-09-13 Thread Bart Van Assche
ypes.h +++ b/include/linux/blk_types.h @@ -16,7 +16,6 @@ struct block_device; struct io_context; struct cgroup_subsys_state; typedef void (bio_end_io_t) (struct bio *); -typedef void (bio_destructor_t) (struct bio *); #ifdef CONFIG_BLOCK /* Reviewed-by: Bart Van Assche <bart.vanass...@sa

[PATCH 0/3] block: Improve bio_set_op_attrs() robustness

2016-09-14 Thread Bart Van Assche
Hi Jens, bio_set_op_attrs() does not yet check whether the "op_flags" field overflows into the "op" field. Since adding support for SMR requires to introduce more REQ_* flags I think it is important to have such a check. Hence this patch series. Please consider these patches for inclusion in

[PATCH 2/3] block, dm-crypt, btrfs: Introduce bio_flags()

2016-09-14 Thread Bart Van Assche
Introduce the bio_flags() macro. Ensure that the second argument of bio_set_op_attrs() only contains flags and no operation. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Ch

[PATCH 3/3] block: Improve bio_set_op_attrs() robustness

2016-09-14 Thread Bart Van Assche
<< ... is signed while 1U << ... is unsigned; adding 0U to an integer expression causes it to be promoted to an unsigned type). Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Rein

[PATCH 1/3] block: Document that bio_op() uses the data type of bio.bi_opf

2016-09-14 Thread Bart Van Assche
Make it clear that the sizeof(unsigned int) expression in BIO_OP_SHIFT refers to the bi_opf member of struct bio. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Christie <mchri...@redhat.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h..

Re: [dm-devel] should blk-mq halt requeue processing while queue is frozen?

2016-09-13 Thread Bart Van Assche
On 09/07/2016 06:41 PM, Mike Snitzer wrote: On Fri, Sep 02 2016 at 6:42pm -0400, Bart Van Assche <bart.vanass...@sandisk.com> wrote: +/** + * blk_mq_quiesce_queue - wait until all pending queue_rq calls have finished + * + * Prevent that new I/O requests are queued and wait until all p

[PATCH] genhd: Handle part_tbl and part pointers correctly

2016-09-25 Thread Bart Van Assche
This patch ensures that sparse does not complain about disk->part_tbl manipulations nor about part_tbl->part accesses. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> --- block/genhd.c | 7 --- block/partition-generic.c | 6 +++--- 2 files changed, 7 inse

[PATCH] bsg: Add sparse annotations to bsg_request_fn()

2016-09-25 Thread Bart Van Assche
Avoid that sparse complains about unbalanced lock actions. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> --- block/bsg-lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 650f427..b2a61e3 100644 --- a/block/bsg-lib.c +++ b/blo

[PATCH 0/9] Introduce blk_quiesce_queue() and blk_resume_queue()

2016-09-26 Thread Bart Van Assche
Hello Jens, Multiple block drivers need the functionality to stop a request queue and to wait until all ongoing request_fn() / queue_rq() calls have finished without waiting until all outstanding requests have finished. Hence this patch series that introduces the blk_quiesce_queue() and

[PATCH 8/9] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-09-26 Thread Bart Van Assche
Ensure that if scsi-mq is enabled that srp_wait_for_queuecommand() waits until ongoing shost->hostt->queuecommand() calls have finished. For the !scsi-mq path, use blk_quiesce_queue() and blk_resume_queue() instead of busy-waiting. Signed-off-by: Bart Van Assche <bart.vanass...@sandis

[PATCH 9/9] [RFC] nvme: Fix a race condition

2016-09-26 Thread Bart Van Assche
Avoid that nvme_queue_rq() is still running when nvme_stop_queues() returns. Untested. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Keith Busch <keith.bu...@intel.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Sagi Grimberg <s...@grimberg.me> --- drive

[PATCH 2/9] dm: Fix a race condition related to stopping and starting queues

2016-09-26 Thread Bart Van Assche
queue_rq() is called without holding the queue lock and hence BLK_MQ_S_STOPPED can be set at any time while dm_mq_queue_rq() is in progress. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> Cc: Mike Snitzer <snit...@redhat.com> --- drivers/md/dm-rq.c | 14 +++--- 1 f

[PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code

2016-09-26 Thread Bart Van Assche
Move the blk_freeze_queue() and blk_unfreeze_queue() implementations from block/blk-mq.c to block/blk-core.c. Drop "_mq" from the name of the functions that have been moved. Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> --- block

  1   2   3   4   5   6   7   8   9   10   >