Re: [dm-devel] 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 th

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

2017-01-27 Thread Bart Van Assche
On Fri, 2017-01-27 at 17:34 +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 th

Re: [dm-devel] [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 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [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: [dm-devel] [PATCH 05/18] block: allow specifying size for extra command data

2017-01-27 Thread Jens Axboe
On 01/27/2017 10:30 AM, Bart Van Assche wrote: > 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: > +sta

Re: [dm-devel] [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 @@ scsi_transport_device_data(struc

Re: [dm-devel] [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 -- dm-devel mailing list dm-devel@redhat

Re: [dm-devel] [PATCH 12/18] scsi: respect unchecked_isa_dma for blk-mq

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > Currently blk-mq always allocates the sense buffer using normal GFP_KERNEL > allocation. Refactor the cmd pool code to split the cmd and sense allocation > and share the code to allocate the sense buffers as well as the sense buffer > s

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

2017-01-27 Thread Bart Van Assche
On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote: > When using the slab allocator we already decide at cache creation time if > an allocation comes from a GFP_DMA pool using the SLAB_CACHE_DMA flag, > and there is no point passing the kmalloc-family only GFP_DMA flag to > kmem_cache_alloc

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

2017-01-27 Thread Jens Axboe
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 *alloc_request_size(gfp_t gfp_mask, void *data) >>> >>> I like alloc_request_simple() but alloc_reques

Re: [dm-devel] [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 -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] [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 *alloc_request_size(gfp_t gfp_mask, vo

Re: [dm-devel] [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? _ex

[dm-devel] split scsi passthrough fields out of struct request V3

2017-01-27 Thread Christoph Hellwig
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 embedded as the first thing into their request-private data, similar to h

[dm-devel] [PATCH 01/19] block: add a op_is_flush helper

2017-01-27 Thread Christoph Hellwig
This centralizes the checks for bios that needs to be go into the flush state machine. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- block/blk-core.c | 8 block/blk-mq-sched.c | 5 ++--- block/blk-mq.c

[dm-devel] [PATCH 02/19] md: cleanup bio op / flags handling in raid1_write_request

2017-01-27 Thread Christoph Hellwig
No need for the local variables, the bio is still live and we can just assign the bits we want directly. Make me wonder why we can't assign all the bio flags to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- drivers/md/raid1.c | 7

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 t

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 my

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

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:42 AM, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 09:38:40AM -0700, Jens Axboe wrote: >>> Ok, I'll repost what I have right now, which is on top of a merge >>> of your block/for-4.11/next and your for-next from this morning >>> my time. >> >> Perfect. > > At least I tried,

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

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:52 AM, Bart Van Assche wrote: > On Fri, 2017-01-27 at 01:04 -0700, Jens Axboe wrote: >> The previous patch had a bug if you didn't use a scheduler, here's a >> version that should work fine in both cases. I've also updated the >> above mentioned branch, so feel free to pull that as

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 01:04 -0700, Jens Axboe wrote: > The previous patch had a bug if you didn't use a scheduler, here's a > version that should work fine in both cases. I've also updated the > above mentioned branch, so feel free to pull that as well and merge to > master like before. Booting ti

Re: [dm-devel] [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue

2017-01-27 Thread Mike Snitzer
On Fri, Jan 27 2017 at 11:36am -0500, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 11:34:34AM -0500, Mike Snitzer wrote: > > Noticed after further review that it seems a bit weird to have the non > > blk-mq support in drivers calling blk_mq_rq_to_pdu(). But I'm not sure > > a blk_rq_to_pdu

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

2017-01-27 Thread Christoph Hellwig
On Fri, Jan 27, 2017 at 09:38:40AM -0700, Jens Axboe wrote: > > Ok, I'll repost what I have right now, which is on top of a merge > > of your block/for-4.11/next and your for-next from this morning > > my time. > > Perfect. At least I tried, looks like the mail server is overloaded and crapped ou

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

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:34 AM, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 09:27:02AM -0700, Jens Axboe wrote: >> Feel free to repost it, I have no problem rebasing that branch as it's >> standalone for now. > > Ok, I'll repost what I have right now, which is on top of a merge > of your block/for-

Re: [dm-devel] [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue

2017-01-27 Thread Christoph Hellwig
On Fri, Jan 27, 2017 at 11:34:34AM -0500, Mike Snitzer wrote: > Noticed after further review that it seems a bit weird to have the non > blk-mq support in drivers calling blk_mq_rq_to_pdu(). But I'm not sure > a blk_rq_to_pdu() macro to blk_mq_rq_to_pdu() is the right thing. What > do you guys th

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

2017-01-27 Thread Christoph Hellwig
On Fri, Jan 27, 2017 at 09:27:02AM -0700, Jens Axboe wrote: > Feel free to repost it, I have no problem rebasing that branch as it's > standalone for now. Ok, I'll repost what I have right now, which is on top of a merge of your block/for-4.11/next and your for-next from this morning my time. Btw

Re: [dm-devel] [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue

2017-01-27 Thread Mike Snitzer
On Wed, Jan 25 2017 at 12:25pm -0500, Christoph Hellwig wrote: > DM already calls blk_mq_alloc_request on the request_queue of the > underlying device if it is a blk-mq device. But now that we allow drivers > to allocate additional data and initialize it ahead of time we need to do > the same fo

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

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:23 AM, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 09:21:46AM -0700, Jens Axboe wrote: >> On 01/27/2017 09:17 AM, Christoph Hellwig wrote: >>> On Fri, Jan 27, 2017 at 09:11:14AM -0700, Jens Axboe wrote: I've queued this up for 4.11. Since some of the patches had depende

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

2017-01-27 Thread Christoph Hellwig
On Fri, Jan 27, 2017 at 09:21:46AM -0700, Jens Axboe wrote: > On 01/27/2017 09:17 AM, Christoph Hellwig wrote: > > On Fri, Jan 27, 2017 at 09:11:14AM -0700, Jens Axboe wrote: > >> I've queued this up for 4.11. Since some of the patches had dependencies > >> on changes in master since for-4.11/block

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

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:17 AM, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 09:11:14AM -0700, Jens Axboe wrote: >> I've queued this up for 4.11. Since some of the patches had dependencies >> on changes in master since for-4.11/block was forked, they are sitting >> in a separate branch that has both

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

2017-01-27 Thread Christoph Hellwig
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? _extra? _special? Don't have any good suggestions, > I'm afraid. Not tha

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

2017-01-27 Thread Christoph Hellwig
On Fri, Jan 27, 2017 at 09:11:14AM -0700, Jens Axboe wrote: > I've queued this up for 4.11. Since some of the patches had dependencies > on changes in master since for-4.11/block was forked, they are sitting > in a separate branch that has both for-4.11/block and v4.10-rc5 pulled > in first. for-ne

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

2017-01-27 Thread Jens Axboe
On Wed, Jan 25 2017, 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 embedded as the

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

2017-01-27 Thread Jens Axboe
On 01/26/2017 11:40 PM, Jens Axboe wrote: > On 01/26/2017 06:22 PM, Jens Axboe wrote: >> On 01/26/2017 06:15 PM, Bart Van Assche wrote: >>> 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 bra