Re: [PATCH 4/9] dm-mpath, scsi_dh: request scsi_dh modules in scsi_dh, not dm-mpath

2015-05-01 Thread Mike Snitzer
On Thu, Apr 30 2015 at 1:32pm -0400, Christoph Hellwig wrote: > This way we can reused the same code any attachment method, not just those > requested from dm-mpath. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- To unsubscribe from this list: send the line

Re: dm-mpath: always return reservation conflict

2015-07-15 Thread Mike Snitzer
On Wed, Jul 15 2015 at 8:15am -0400, Hannes Reinecke wrote: > On 07/15/2015 02:01 PM, James Bottomley wrote: > > On Wed, 2015-07-15 at 13:52 +0200, Hannes Reinecke wrote: > >> On 07/15/2015 01:35 PM, James Bottomley wrote: > >>> On Wed, 2015-07-15 at 13:23 +0200, Hannes Reinecke wrote: > If

Re: Persistent Reservation API

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > This series adds support for a simplified persistent reservation API > to the block layer. The intent is that both in-kernel and userspace > consumers can use the API instead of having to hand craft SCSI or NVMe > command through t

Re: [PATCH 4/6] dm: refactor ioctl handling

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > This moves the call to blkdev_ioctl and the argument checking to core code, > and only leaves a callout to find the block device to operate on it the > targets. This will simplifies the code and will allow us to pass through > ioct

Re: [PATCH 5/6] dm: split out a helper to find the ioctl target

2015-08-04 Thread Mike Snitzer
On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > We want to reuse this code for the persistent reservation handling, > so move it into a helper. > > Signed-off-by: Christoph Hellwig > --- > drivers/md/dm.c | 50 -- > 1 file change

Re: [PATCH 07/12] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-27 Thread Mike Snitzer
; Signed-off-by: Bart Van Assche > Reviewed-by: Christoph Hellwig > Cc: Mike Snitzer Acked-by: Mike Snitzer -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 08/12] dm: Fix a race condition related to stopping and starting queues

2016-10-27 Thread Mike Snitzer
y: Bart Van Assche > Reviewed-by: Hannes Reinecke > Reviewed-by: Johannes Thumshirn > Reviewed-by: Christoph Hellwig > Cc: Mike Snitzer Acked-by: Mike Snitzer -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[LSF/MM TOPIC ATTEND] multipath for NVMe over Fabrics

2016-12-08 Thread Mike Snitzer
I'd like to discuss $subject. I haven't heard of much progress on this (but I'm also not tracking NVMe development at the moment). Last I heard about getting DM multipath to work with NVMe over Fabrics was this: https://patchwork.kernel.org/patch/9208997/ I've reintroduced bio-based support for

Re: [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue

2017-01-11 Thread Mike Snitzer
On Wed, Jan 11 2017 at 3:45am -0500, Christoph Hellwig wrote: > On Wed, Jan 11, 2017 at 09:42:44AM +0100, Johannes Thumshirn wrote: > > On Tue, Jan 10, 2017 at 04:06:19PM +0100, Christoph Hellwig wrote: > > > Simply the boilerplate code needed for bsg nodes a bit. > > > > > > Signed-off-by: Chr

Re: [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue

2017-01-11 Thread Mike Snitzer
On Wed, Jan 11 2017 at 4:37am -0500, Hannes Reinecke wrote: > On 01/11/2017 10:01 AM, Christoph Hellwig wrote: > > On Wed, Jan 11, 2017 at 09:59:17AM +0100, Hannes Reinecke wrote: > >> I'd advocate to discuss this at LSF. > >> Now that Mike moved the bio-based mpath stuff back in things got even

Re: [LSF/MM TOPIC][LSF/MM ATTEND] multipath redesign

2017-01-11 Thread Mike Snitzer
On Wed, Jan 11 2017 at 4:44am -0500, Hannes Reinecke wrote: > Hi all, > > I'd like to attend LSF/MM this year, and would like to discuss a > redesign of the multipath handling. > > With recent kernels we've got quite some functionality required for > multipathing already implemented, making so

Re: RFC: split scsi passthrough fields out of struct request

2017-01-11 Thread Mike Snitzer
On Tue, Jan 10 2017 at 10:06am -0500, 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

Re: [PATCH 05/15] dm: remove incomple BLOCK_PC support

2017-01-11 Thread Mike Snitzer
On Tue, Jan 10 2017 at 10:06am -0500, 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. > > Signed-off-by: Christoph Hellwig > --- > drivers/md/dm-rq.c | 16

Re: [PATCH 05/15] dm: remove incomple BLOCK_PC support

2017-01-12 Thread Mike Snitzer
On Thu, Jan 12 2017 at 3:00am -0500, Christoph Hellwig wrote: > On Wed, Jan 11, 2017 at 08:09:37PM -0500, Mike Snitzer wrote: > > I'm not following your reasoning. > > > > dm_blk_ioctl calls __blkdev_driver_ioctl and will call scsi_cmd_ioctl > >

Re: [LSF/MM TOPIC][LSF/MM ATTEND] multipath redesign

2017-01-13 Thread Mike Snitzer
On Fri, Jan 13 2017 at 10:56am -0500, Hannes Reinecke wrote: > On 01/12/2017 06:29 PM, Benjamin Marzinski wrote: > > On Thu, Jan 12, 2017 at 09:27:40AM +0100, Hannes Reinecke wrote: > >> On 01/11/2017 11:23 PM, Mike Snitzer wrote: > >>> On Wed, Jan 11 2017 at 4:44a

Re: [PATCH 05/16] dm: always defer request allocation to the owner of the request_queue

2017-01-24 Thread Mike Snitzer
On Mon, Jan 23 2017 at 10:29am -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: [PATCH 05/16] dm: always defer request allocation to the owner of the request_queue

2017-01-24 Thread Mike Snitzer
On Tue, Jan 24 2017 at 9:20am -0500, Christoph Hellwig wrote: > On Tue, Jan 24, 2017 at 05:05:39AM -0500, Mike Snitzer wrote: > > possible and is welcomed cleanup. The only concern I have is that using > > get_request() for the old request_fn request_queue eliminates the

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

2017-01-27 Thread Mike Snitzer
p. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Hannes Reinecke > Reviewed-by: Mike Snitzer ... > diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c > index 3f12916..8d06834 100644 > --- a/drivers/md/dm-rq.c > +++ b/drivers/md/dm-rq.c > @@ -185,7 +163,7 @@ static voi

Re: [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&#

Re: [PATCH 1/2] Don't blacklist nvme

2017-02-15 Thread Mike Snitzer
On Wed, Feb 15 2017 at 9:01pm -0500, Mike Snitzer wrote: > On Tue, Feb 14 2017 at 6:00pm -0500, > Keith Busch wrote: > > > On Tue, Feb 14, 2017 at 01:35:45PM -0800, Bart Van Assche wrote: > > > On 02/14/2017 01:19 PM, Keith Busch wrote: > > > > These dev

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-16 Thread Mike Snitzer
On Thu, Feb 16 2017 at 9:26am -0500, Christoph Hellwig wrote: > On Wed, Feb 15, 2017 at 09:53:57PM -0500, Mike Snitzer wrote: > > going to LSF/MM?). Yet you're expecting to just drop it into the tree > > without a care in the world about the implications. > > I

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-16 Thread Mike Snitzer
On Thu, Feb 16 2017 at 1:07pm -0500, Keith Busch wrote: > On Thu, Feb 16, 2017 at 05:37:41PM +, Bart Van Assche wrote: > > On Thu, 2017-02-16 at 12:38 -0500, Keith Busch wrote: > > > Maybe I'm not seeing the bigger picture. Is there some part to multipath > > > that the kernel is not in a be

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:33am -0500, Christoph Hellwig wrote: > On Thu, Feb 16, 2017 at 10:13:37AM -0500, Mike Snitzer wrote: > > Not following what you're saying Keith did. Please feel free to > > clarify. > > Keith demonstrated what it takes to support NVMe with dm

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:05am -0500, Christoph Hellwig wrote: > On Thu, Feb 16, 2017 at 08:05:36PM +0200, Sagi Grimberg wrote: > > I guess one config option that we'd need is multibus vs. failover > > which are used per use-case. > > Which fundamentally is a property of the target first, and it

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:04am -0500, h...@infradead.org wrote: > On Thu, Feb 16, 2017 at 01:21:29PM -0500, Mike Snitzer wrote: > > multipath-tools has tables that specify all the defaults for a given > > target backend. NVMe will just be yet another. > > No, if we get

Re: [PATCHv2] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-18 Thread Mike Snitzer
On Fri, Feb 17, 2017 at 3:27 AM, Christoph Hellwig wrote: > > On Fri, Feb 17, 2017 at 09:06:14AM +0100, Hannes Reinecke wrote: > > We could, but why? > > ATM we're only having SCSI devices able to use device handler; adding > > another layer of indirection doesn't solve anything here. > > Moving t

Re: [PATCHv3] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-21 Thread Mike Snitzer
On Mon, Feb 20, 2017 at 10:22 PM, Martin K. Petersen wrote: >> "Hannes" == Hannes Reinecke writes: > > Hannes> The device handler needs to check if a given queue belongs to a > Hannes> scsi device; only then does it make sense to attach a device > Hannes> handler. > > Fixed kbuild warning and

Re: [PATCH 0/15] SCSI XCOPY support for the kernel and device mapper

2014-08-28 Thread Mike Snitzer
On Tue, Jul 15 2014 at 3:34pm -0400, Mikulas Patocka wrote: > This patch series makes it possible to use SCSI XCOPY offload for the > block layer and device mapper. > > It is based on Martin Petersen's work > https://git.kernel.org/cgit/linux/kernel/git/mkp/linux.git/commit/?h=xcopy&id=0bdeed2

Re: scsi-debug regression with 4.5-rc?

2016-03-04 Thread Mike Snitzer
On Wed, Jan 20 2016 at 10:57am -0500, Martin K. Petersen wrote: > > "Ewan" == Ewan Milne writes: > > Ewan> So I have a report from our test people that the optimal_io_size > Ewan> sysfs value is now different by a factor of 512 from what it used > Ewan> to be... > > Yes, just prepared a pa

[RFC PATCH 3/4] dm mpath: move trigger_event member to the end of 'struct multipath'

2016-03-31 Thread Mike Snitzer
Allows the 'work_mutex' member to no longer cross a cacheline. Signed-off-by: Mike Snitzer --- drivers/md/dm-mpath.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 780e5d0..54daf96 100644 --- a/drivers/md/

[RFC PATCH 1/4] dm mpath: switch to using bitops for state flags

2016-03-31 Thread Mike Snitzer
Mechanical change that doesn't make any real effort to reduce the use of m->lock; that will come later (once atomics are used for counters, etc). Suggested-by: Hannes Reinecke Signed-off-by: Mike Snitzer --- drivers/md/dm-mpath.c | 131 +-

[RFC PATCH 2/4] dm mpath: use atomic_t for counting members of 'struct multipath'

2016-03-31 Thread Mike Snitzer
The use of atomic_t for nr_valid_paths, pg_init_in_progress and pg_init_count will allow relaxing the use of the m->lock spinlock. Suggested-by: Hannes Reinecke Signed-off-by: Mike Snitzer --- drivers/md/dm-mpath.c | 61 --- 1 file changed,

[RFC PATCH 4/4] dm mpath: eliminate use of spinlock in IO fast-paths

2016-03-31 Thread Mike Snitzer
path() is modified to _not_ update m->current_pgpath unless it also switches the path-group. This is done to avoid needing to take the m->lock everytime __multipath_map() calls choose_pgpath(). But m->current_pgpath will be reset if it is failed via fail_path(). Suggested-by: Jeff Moyer S

[RFC PATCH 0/4] dm mpath: vastly improve blk-mq IO performance

2016-03-31 Thread Mike Snitzer
o get this patchset out now to raise awareness about how I think DM multipath will be changing (for inclussion during the Linux 4.7 merge window). Mike Snitzer (4): dm mpath: switch to using bitops for state flags dm mpath: use atomic_t for counting members of 'struct multipath' dm

Re: [RFC PATCH 0/4] dm mpath: vastly improve blk-mq IO performance

2016-04-01 Thread Mike Snitzer
On Fri, Apr 01 2016 at 4:12am -0400, Johannes Thumshirn wrote: > On 2016-03-31 22:04, Mike Snitzer wrote: > >I developed these changes some weeks ago but have since focused on > >regression and performance testing on larger NUMA systems. > > > >For regression tes

Re: [RFC PATCH 0/4] dm mpath: vastly improve blk-mq IO performance

2016-04-01 Thread Mike Snitzer
On Fri, Apr 01 2016 at 9:37am -0400, Johannes Thumshirn wrote: > [ +Cc Hannes ] > > On 2016-04-01 15:22, Mike Snitzer wrote: > >On Fri, Apr 01 2016 at 4:12am -0400, > >Johannes Thumshirn wrote: > > > >>On 2016-03-31 22:04, Mike Snitzer wrote: > >>

Re: [RFC PATCH 0/4] dm mpath: vastly improve blk-mq IO performance

2016-04-07 Thread Mike Snitzer
On Thu, Apr 07 2016 at 10:58am -0400, Hannes Reinecke wrote: > On 03/31/2016 10:04 PM, Mike Snitzer wrote: > > I developed these changes some weeks ago but have since focused on > > regression and performance testing on larger NUMA systems. > > > > For regression tes

Re: [RFC PATCH 0/4] dm mpath: vastly improve blk-mq IO performance

2016-04-08 Thread Mike Snitzer
On Fri, Apr 08 2016 at 7:42am -0400, Johannes Thumshirn wrote: > Ladies and Gentlemen, > To show off some numbers from our testing: > > All tests are performed against the cache of the Array, not the disks as we > wanted to test the Linux stack not the Disk Array. > > All single queue tests h

Re: [PATCH 00/42] v7: separate operations from flags in the bio/request structs

2016-04-15 Thread Mike Snitzer
On Fri, Apr 15 2016 at 3:15pm -0400, mchri...@redhat.com wrote: > The following patches begin to cleanup the request->cmd_flags and > bio->bi_rw mess. We currently use cmd_flags to specify the operation, > attributes and state of the request. For bi_rw we use it for similar > info and also the p

Re: Notes from the four separate IO track sessions at LSF/MM

2016-04-28 Thread Mike Snitzer
On Wed, Apr 27 2016 at 7:39pm -0400, James Bottomley wrote: > Multipath - Mike Snitzer > > > Mike began with a request for feedback, which quickly lead to the > complaint that recovery time (and how you recover) was one of the > biggest issue

bio-based DM multipath is back from the dead [was: Re: Notes from the four separate IO track sessions at LSF/MM]

2016-05-25 Thread Mike Snitzer
On Thu, Apr 28 2016 at 11:40am -0400, James Bottomley wrote: > On Thu, 2016-04-28 at 08:11 -0400, Mike Snitzer wrote: > > Full disclosure: I'll be looking at reinstating bio-based DM multipath to > > regain efficiencies that now really matter when issuing IO to extremely &

Re: bio-based DM multipath is back from the dead [was: Re: Notes from the four separate IO track sessions at LSF/MM]

2016-05-27 Thread Mike Snitzer
On Fri, May 27 2016 at 4:39am -0400, Hannes Reinecke wrote: > On 05/26/2016 04:38 AM, Mike Snitzer wrote: > >On Thu, Apr 28 2016 at 11:40am -0400, > >James Bottomley wrote: > > > >>On Thu, 2016-04-28 at 08:11 -0400, Mike Snitzer wrote: > >>>Full disc

Re: bio-based DM multipath is back from the dead [was: Re: Notes from the four separate IO track sessions at LSF/MM]

2016-05-27 Thread Mike Snitzer
On Fri, May 27 2016 at 11:42am -0400, Hannes Reinecke wrote: > On 05/27/2016 04:44 PM, Mike Snitzer wrote: > >On Fri, May 27 2016 at 4:39am -0400, > >Hannes Reinecke wrote: > > > [ .. ] > >>No, the real issue is load-balancing. > >>If you have several

Re: block: don't check request size in blk_cloned_rq_check_limits()

2016-06-10 Thread Mike Snitzer
On Mon, May 30 2016 at 3:24am -0400, Hannes Reinecke wrote: > When checking a cloned request there is no need to check > the overall request size; this won't have changed even > when resubmitting to another queue. > Without this patch ppc64le on ibmvfc fails to boot. By simply removing the chec

Re: block: don't check request size in blk_cloned_rq_check_limits()

2016-06-10 Thread Mike Snitzer
On Fri, Jun 10 2016 at 9:30am -0400, Hannes Reinecke wrote: > On 06/10/2016 03:19 PM, Mike Snitzer wrote: > > On Mon, May 30 2016 at 3:24am -0400, > > Hannes Reinecke wrote: > > > >> When checking a cloned request there is no need to check > >> th

[PATCH] dm mpath: disable WRITE SAME if it fails

2013-09-19 Thread Mike Snitzer
6/queue/write_same_max_bytes 0 It should be noted that WRITE SAME support wasn't enabled in DM multipath until v3.10. Signed-off-by: Mike Snitzer Cc: Martin K. Petersen Cc: Hannes Reinecke Cc: sta...@vger.kernel.org # 3.10+ --- drivers/md/dm-mpath.c | 11 ++- drivers/md/dm.c

SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-20 Thread Mike Snitzer
On Thu, Sep 19 2013 at 12:13pm -0400, Mike Snitzer wrote: > Workaround the SCSI layer's problematic WRITE SAME heuristics by > disabling WRITE SAME in the DM multipath device's queue_limits if an > underlying device disabled it. ... > This fix doesn't help configur

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-24 Thread Mike Snitzer
On Tue, Sep 24 2013 at 1:39am -0400, Hannes Reinecke wrote: > On 09/23/2013 08:18 PM, Ewan Milne wrote: > > On Fri, 2013-09-20 at 18:03 -0400, Martin K. Petersen wrote: > > ... > >> Only a handful of the very latest and greatest devices support RSOC. The > >> number of devices that support WRITE

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-24 Thread Mike Snitzer
On Tue, Sep 24 2013 at 9:49am -0400, Martin K. Petersen wrote: > >>>>> "Mike" == Mike Snitzer writes: > > Mike> So are there drives like this?: > Mike> 1) don't support RSOC > Mike> 2) do support WRITE SAME > Mike> 3) do popula

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-24 Thread Mike Snitzer
On Tue, Sep 24 2013 at 4:44pm -0400, Martin K. Petersen wrote: > The other headache is what happens if a stacking driver gets -EIO or > -EREMOTEIO on a WRITE SAME request. That's what Mike was trying to fix > with his patch. Maybe it would make sense for us to use -EINVAL or > something similar

Re: dm + blk-mq soft lockup complaint

2015-01-15 Thread Mike Snitzer
On Thu, Jan 15 2015 at 3:11am -0500, Bart Van Assche wrote: > On 01/14/15 20:00, Mike Snitzer wrote: > > IB aside, I haven't been following along close enough on scsi-mq > > developments, but does a regular iscsi initiator have support for > > scsi-mq? I'd like t

[PATCH 1/7] blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path

2015-03-11 Thread Mike Snitzer
If percpu_ref_init() fails the 'err_hctxs' label should be used instead of 'err_map'. Signed-off-by: Mike Snitzer --- block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 4f4bea2..459840c 100644 --- a/block/

[PATCH 2/7] blk-mq: add blk_mq_init_allocated_queue and export blk_mq_register_disk

2015-03-11 Thread Mike Snitzer
r use with alloc_dev() but the decision about what type of request_queue will be ultimately created is deferred until all component devices referenced in the DM table are processed to determine the table type (request-based, blk-mq request-based, or bio-based). Signed-off-by: Mike Snitzer --- bl

[PATCH 7/7] dm: add 'use_blk_mq' module param and expose in per-device ro sysfs attr

2015-03-11 Thread Mike Snitzer
p and reduced work (e.g. the md->io_pool and md->rq_pool isn't created if using blk-mq). Signed-off-by: Mike Snitzer --- drivers/md/Kconfig| 11 +++ drivers/md/dm-sysfs.c | 9 + drivers/md/dm-table.c | 6 +++--- drivers/md

[PATCH 4/7] blk-mq: don't wait in blk_mq_queue_enter() if __GFP_WAIT isn't set

2015-03-11 Thread Mike Snitzer
From: Keith Busch Return -EBUSY if we're unable to enter a queue immediately when allocating a blk-mq request without __GFP_WAIT. Signed-off-by: Keith Busch Signed-off-by: Mike Snitzer --- block/blk-mq.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bloc

[PATCH 6/7] dm: optimize dm_mq_queue_rq to _not_ use kthread if using pure blk-mq

2015-03-11 Thread Mike Snitzer
request). But the kthread will still be used to queue work if blk-mq is used ontop of old-style request_fn device(s). Also prepare for supporting DM blk-mq ontop of old-style request_fn device(s) if a new dm-mod 'use_blk_mq' parameter is set. Signed-off-by: Mike Snitzer --- dr

[PATCH 3/7] blk-mq: export blk_mq_run_hw_queues

2015-03-11 Thread Mike Snitzer
Rename blk_mq_run_queues to blk_mq_run_hw_queues, add async argument, and export it. DM's suspend support must be able to run the queue without starting stopped hw queues. Signed-off-by: Mike Snitzer --- block/blk-mq.c | 8 include/linux/blk-mq.h | 1 + 2 files chang

[PATCH 0/7] dm: add full blk-mq support to request-based DM

2015-03-11 Thread Mike Snitzer
//www.redhat.com/archives/dm-devel/2014-June/msg00030.html) Jens and Keith, special thanks for your help answering more blk-mq questions than I'd have hoped would be needed while at LSF/MM. Keith Busch (1): blk-mq: don't wait in blk_mq_queue_enter() if __GFP_WAIT isn't set Mike S

[PATCH 5/7] dm: add full blk-mq support to request-based DM

2015-03-11 Thread Mike Snitzer
e mapper (~470k IOPS). I could only push ~20% of the raw iops through dm before this conversion, so this latest tree is looking really solid from a performance standpoint." Tested-by: Keith Busch Signed-off-by: Mike Snitzer --- drivers/md/dm-mpath.c | 4 +- drivers/md/dm-table.c

Re: [PATCH 1/7] blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path

2015-03-12 Thread Mike Snitzer
On Thu, Mar 12 2015 at 3:48am -0400, Ming Lei wrote: > On Thu, Mar 12, 2015 at 11:56 AM, Mike Snitzer wrote: > > If percpu_ref_init() fails the 'err_hctxs' label should be used instead > > of 'err_map'. > > > > Signed-off-by: Mike Snitzer > &g

[PATCH 1/7 v2] blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path

2015-03-12 Thread Mike Snitzer
If percpu_ref_init() fails the 'err_hctxs' label should be used instead of 'err_map'. Rather than reuse 'err_hw', which was introduced if the later blk_mq_init_hw_queues() call fails, move percpu_ref_init() before blk_alloc_queue_node(). Signed-off-by: Mike

[PATCH 2/7 v2] blk-mq: add blk_mq_init_allocated_queue and export blk_mq_register_disk

2015-03-12 Thread Mike Snitzer
lization of the request_queue type the call to blk_mq_register_disk() doesn't happen during alloc_dev(). Must export blk_mq_register_disk() so that DM can backfill the 'mq' dir once the blk-mq queue is fully allocated. Signed-off-by: Mike Snitzer Reviewed-by: Ming Lei --- block/blk-mq-sy

Re: [PATCH 1/7] blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path

2015-03-12 Thread Mike Snitzer
On Thu, Mar 12 2015 at 9:51am -0400, Mike Snitzer wrote: > On Thu, Mar 12 2015 at 3:48am -0400, > Ming Lei wrote: > > > On Thu, Mar 12, 2015 at 11:56 AM, Mike Snitzer wrote: > > > If percpu_ref_init() fails the 'err_hctxs' label should be used instead >

[PATCH 1/7 v3] blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path

2015-03-12 Thread Mike Snitzer
If percpu_ref_init() fails the allocated q and hctxs must get cleaned up; using 'err_map' doesn't allow that to happen. Signed-off-by: Mike Snitzer Reviewed-by: Ming Lei --- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b

[PATCH 2/7 v3] blk-mq: add blk_mq_init_allocated_queue and export blk_mq_register_disk

2015-03-12 Thread Mike Snitzer
lization of the request_queue type the call to blk_mq_register_disk() doesn't happen during alloc_dev(). Must export blk_mq_register_disk() so that DM can backfill the 'mq' dir once the blk-mq queue is fully allocated. Signed-off-by: Mike Snitzer Reviewed-by: Ming Lei --- block/blk-mq-sy

Re: [PATCH 2/2] dm: Avoid use-after-free of a mapped device

2013-02-22 Thread Mike Snitzer
[] worker_thread+0x15e/0x440 > [] kthread+0xdb/0xe0 > [] ret_from_fork+0x7c/0xb0 Your commit header should probably reference commit a8c32a5c98943d370ea606a2e7dc04717eb92206 ("dm: fix deadlock with request based dm and queue request_fn recursion") and cc: stable with "v3.7+&q

Re: [PATCH 2/2] dm: Avoid use-after-free of a mapped device

2013-02-22 Thread Mike Snitzer
On Fri, Feb 22 2013 at 6:22am -0500, Bart Van Assche wrote: > On 02/22/13 12:08, Mike Snitzer wrote: > >On Fri, Feb 22 2013 at 5:47am -0500, > >Bart Van Assche wrote: > > > >>As the comment above rq_completed() explains, md members must > >>not be touche

Re: dm: do not replace bioset for request-based dm

2013-02-26 Thread Mike Snitzer
could cause the oops in bio_put(). > > Since the size of front_pad may change only with bio-based dm, > it is not necessary to replace bioset for request-based dm. > > Reported-by: Bart Van Assche > Tested-by: Bart Van Assche > Signed-off-by: Jun'ichi Nomura > C

[PATCH] [SCSI] sd: workaround invalid OPTIMAL TRANSFER LENGTH

2013-04-03 Thread Mike Snitzer
/block/sdb/queue/optimal_io_size 0 Signed-off-by: Mike Snitzer --- drivers/scsi/sd.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7992635..34638c1 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2516,6 +2516,7 @@ s

[PATCH 1/2] [SCSI] scsi_dh: add scsi_dh_alloc_data

2013-04-08 Thread Mike Snitzer
change will allow DM multipath to preallocate the scsi_dh_data during the multipath table load but then defer the scsi_dh_attach until the multipath table resume (memory allocation is not allowed during DM table resume). Signed-off-by: Mike Snitzer --- drivers/md/dm-mpath.c

[PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-08 Thread Mike Snitzer
sh is that the endio routine for the path-management request is working with structures that were freed when the handler was detached. References: http://bugzilla.redhat.com/912245 http://bugzilla.redhat.com/902595 Signed-off-by: Mike Snitzer --- drivers/md/dm-mpat

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-22 Thread Mike Snitzer
On Mon, Apr 08 2013 at 5:50pm -0400, Mike Snitzer wrote: > Preallocate scsi_dh_data using scsi_dh_alloc_data() during table load > but attach the scsi_dh for each path during table resume. This avoids a > kernel crash that can happen when changing the scsi_dh during table > load.

Re: T10 WCE interpretation in Linux & device level access

2013-04-24 Thread Mike Snitzer
On Wed, Apr 24 2013 at 8:12am -0400, Hannes Reinecke wrote: > On 04/24/2013 02:08 PM, Paolo Bonzini wrote: > > Il 24/04/2013 14:07, Hannes Reinecke ha scritto: > >> On 04/24/2013 01:17 PM, Paolo Bonzini wrote: > >>> Il 23/04/2013 22:07, James Bottomley ha scritto: > On Tue, 2013-04-23 at 15

Re: sd: workaround invalid OPTIMAL TRANSFER LENGTH

2013-04-24 Thread Mike Snitzer
On Wed, Apr 24 2013 at 9:19pm -0400, Martin K. Petersen wrote: > >>>>> "Mike" == Mike Snitzer writes: > > Mike, > > Following up on our discussion at LSF/MM last week... > > Mike> Workaround disk firmware that improperly sets OPTIMAL TRANS

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-25 Thread Mike Snitzer
On Thu, Apr 25 2013 at 9:48am -0400, Mikulas Patocka wrote: > > > On Mon, 22 Apr 2013, Mike Snitzer wrote: > > > I spoke with Hannes at LSF, to address the potential crashes in the > > endio path (e.g. stpg_endio) we'd have to bump the scsi_dh_data kref > &g

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-25 Thread Mike Snitzer
On Thu, Apr 25 2013 at 10:50am -0400, Mikulas Patocka wrote: > > > On Thu, 25 Apr 2013, Mike Snitzer wrote: > > > On Thu, Apr 25 2013 at 9:48am -0400, > > Mikulas Patocka wrote: > > > > > > > > > > > On Mon, 22 Apr 2013, Mike Sni

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-25 Thread Mike Snitzer
On Thu, Apr 25 2013 at 11:27am -0400, Bryn M. Reeves wrote: > On 04/25/2013 03:50 PM, Mikulas Patocka wrote: > >On Thu, 25 Apr 2013, Mike Snitzer wrote: > >>The handler that is automatically attached _should_ be the correct > >>handler. We now have the .match() hook

Re: [PATCH 2/2] dm mpath: attach scsi_dh during table resume

2013-04-26 Thread Mike Snitzer
On Fri, Apr 26 2013 at 2:05am -0400, Hannes Reinecke wrote: > On 04/25/2013 05:31 PM, Mike Snitzer wrote: > > On Thu, Apr 25 2013 at 10:50am -0400, > > Mikulas Patocka wrote: > > > >> > >> > >> On Thu, 25 Apr 2013, Mike Snitzer wrote:

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 2:24pm -0500, Jens Axboe wrote: > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > >On 11/25/2015 06:56 PM, Jens Axboe wrote: > >>On 11/25/2015 02:04 AM, Hannes Reinecke wrote: > >>>On 11/20/2015 04:28 PM, Ewan Milne wrote: > On Fri, 2015-11-20 at 15:55 +0100, Hannes R

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 3:23pm -0500, Mike Snitzer wrote: > On Wed, Nov 25 2015 at 2:24pm -0500, > Jens Axboe wrote: > > > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > > >The problem is that NOMERGE does too much, as it inhibits _any_ merging. > > > >

Re: block: Always check queue limits for cloned requests

2015-11-26 Thread Mike Snitzer
init_sgtable(). > > To clarify this the patch renames blk_rq_check_limits() > to blk_cloned_rq_check_limits() and removes the symbol > export, as the new function should only be used for > cloned requests and never exported. > > Cc: Mike Snitzer > Cc: Ewan Milne > Cc: Jeff

Re: block: Always check queue limits for cloned requests

2015-11-29 Thread Mike Snitzer
On Sun, Nov 29 2015 at 11:15am -0500, Markus Trippelsdorf wrote: > On 2015.11.29 at 16:43 +0100, Hannes Reinecke wrote: > > On 11/29/2015 12:49 PM, Markus Trippelsdorf wrote: > > > > > > I'm still seeing the issue (BUG at drivers/scsi/scsi_lib.c:1096!) even > > > with this patch applied. > > >

Re: dm-mpath: fix a tiny case which can cause an infinite loop

2016-02-03 Thread Mike Snitzer
On Wed, Feb 03 2016 at 9:08pm -0500, jiangyiwen wrote: > When two processes submit WRTIE SAME bio simultaneously and > first IO return failed because of INVALID FIELD IN CDB, and > then second IO can enter into an infinite loop. > The problem can be described as follows: > > process 1

Re: dm-mpath: fix a tiny case which can cause an infinite loop

2016-02-03 Thread Mike Snitzer
On Wed, Feb 03 2016 at 10:49pm -0500, jiangyiwen wrote: > On 2016/2/4 11:24, Mike Snitzer wrote: > > On Wed, Feb 03 2016 at 9:08pm -0500, > > jiangyiwen wrote: > > > >> When two processes submit WRTIE SAME bio simultaneously and > >> first IO return fail

Re: dm-multipath test scripts

2016-02-18 Thread Mike Snitzer
On Wed, Oct 07 2015 at 1:39am -0400, Junichi Nomura wrote: > This is a set of scripts for kernel-side dm-multipath testing. Current > set of scripts are stress testing of extreme situation and its coverage > is limited. But recently found dm-mpath regressions should be detectable > with this. I

Re: dm-multipath test scripts

2016-02-19 Thread Mike Snitzer
On Fri, Feb 19 2016 at 3:37am -0500, Junichi Nomura wrote: > On 02/19/16 09:33, Nomura Junichi wrote: > > On 02/19/16 02:17, Mike Snitzer wrote: > >> What is the last kernel version that your scripts have worked on? > > > > v4.4 worked fine. I'll check

Re: dm-multipath test scripts

2016-02-19 Thread Mike Snitzer
On Fri, Feb 19 2016 at 2:42pm -0500, Mike Snitzer wrote: > On Fri, Feb 19 2016 at 3:37am -0500, > Junichi Nomura wrote: > > > On 02/19/16 09:33, Nomura Junichi wrote: > > > On 02/19/16 02:17, Mike Snitzer wrote: > > >> What is the last kernel vers

Re: dm-multipath test scripts

2016-02-20 Thread Mike Snitzer
On Sat, Feb 20 2016 at 4:42am -0500, Hannes Reinecke wrote: > On 02/20/2016 07:12 AM, Mike Snitzer wrote: > >On Fri, Feb 19 2016 at 2:42pm -0500, > >Mike Snitzer wrote: > > > >>On Fri, Feb 19 2016 at 3:37am -0500, > >>Junichi Nomura wrote: > >&

why is blk-mq requeue foricbly kicking stopped queues? [was: Re: dm-multipath test scripts]

2016-02-22 Thread Mike Snitzer
On Mon, Feb 22 2016 at 4:51am -0500, Junichi Nomura wrote: > On 02/20/16 15:12, Mike Snitzer wrote: > > On Fri, Feb 19 2016 at 2:42pm -0500, Mike Snitzer > > wrote: > >> Have you been running with blk-mq? > >> Either by setting CONFIG_DM_MQ_DEFAULT or:

Re: why is blk-mq requeue foricbly kicking stopped queues? [was: Re: dm-multipath test scripts]

2016-02-22 Thread Mike Snitzer
On Mon, Feb 22 2016 at 8:34pm -0500, Junichi Nomura wrote: > On 02/23/16 00:09, Mike Snitzer wrote: > > I should note that I applied this patch for 4.6: > > https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-4.6&id=7db905b3d4294e5db4c29

Re: dm-multipath test scripts

2016-02-24 Thread Mike Snitzer
On Thu, Feb 18 2016 at 7:33pm -0500, Junichi Nomura wrote: > Hi Mike, > > On 02/19/16 02:17, Mike Snitzer wrote: > > > Taking a step back: > > These scripts don't belong in Documentation/device-mapper/mptest/ (or > > anywhere in the kernel tree for that mat

Re: randconfig build error with next-20150908, in drivers/md/dm-mpath.c

2015-09-08 Thread Mike Snitzer
On Tue, Sep 08 2015 at 1:34pm -0400, James Bottomley wrote: > On Tue, 2015-09-08 at 13:23 -0400, Mike Snitzer wrote: > > On Tue, Sep 08 2015 at 1:10pm -0400, > > Jim Davis wrote: > > > > > Building with the attached random configuration file, > > >

Re: [PATCH 05/17] Update the md driver to use idr helper functions.

2015-09-15 Thread Mike Snitzer
Subject should really be: "dm: update to use idr helper functions" -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: req->nr_phys_segments > queue_max_segments (was Re: kernel BUG at drivers/block/virtio_blk.c:172!)

2015-10-01 Thread Mike Snitzer
On Thu, Oct 1, 2015 at 5:20 AM, Hannes Reinecke wrote: > On 10/01/2015 11:00 AM, Michael S. Tsirkin wrote: >> On Thu, Oct 01, 2015 at 03:10:14AM +0200, Thomas D. wrote: >>> Hi, >>> >>> I have a virtual machine which fails to boot linux-4.1.8 while mounting >>> file systems: >>> * Mounting loc

Re: Bugs in multipath scsi in 4.3-rc2

2015-10-12 Thread Mike Snitzer
On Mon, Oct 12, 2015 at 10:39 AM, Christoph Hellwig wrote: > On Mon, Oct 12, 2015 at 02:45:38PM +0200, Hannes Reinecke wrote: >> You cannot easily use the driver model here as the scsi_device is >> already (potentially) bound to the ULDs. >> If you were to go with the driver model you'd have to in

Re: Persistent Reservation API V4

2015-10-28 Thread Mike Snitzer
On Thu, Oct 15 2015 at 8:10am -0400, Christoph Hellwig wrote: > This series adds support for a simplified Persistent Reservation API > to the block layer. The intent is that both in-kernel and userspace > consumers can use the API instead of having to hand craft SCSI or NVMe > command through t

Re: Persistent Reservation API V4

2015-10-28 Thread Mike Snitzer
On Wed, Oct 28 2015 at 2:43pm -0400, Mike Snitzer wrote: > On Thu, Oct 15 2015 at 8:10am -0400, > Christoph Hellwig wrote: > > > This series adds support for a simplified Persistent Reservation API > > to the block layer. The intent is that both in-kernel and userspace

IBM request to allow unprivledged ioctls [Was: Revert "dm mpath: fix stalls when handling invalid ioctls"]

2015-10-29 Thread Mike Snitzer
On Thu, Oct 29 2015 at 8:24am -0400, Mauricio Faria de Oliveira wrote: > This reverts commit a1989b330093578ea5470bea0a00f940c444c466. > > That commit introduced a regression at least for the case of the SG_IO ioctl() > running without CAP_SYS_RAWIO capability (e.g., unprivileged users) when th

Re: IBM request to allow unprivledged ioctls [Was: Revert "dm mpath: fix stalls when handling invalid ioctls"]

2015-10-31 Thread Mike Snitzer
On Sat, Oct 31 2015 at 11:33am -0400, Paolo Bonzini wrote: > > > On 29/10/2015 14:18, Mike Snitzer wrote: > > > 4) dmesg shows that scsi_verify_blk_ioctl() failed for SG_IO (0x2285); > > >it returns -ENOIOCTLCMD, later replaced with -ENOTTY in vfs_ioctl(

Re: IBM request to allow unprivledged ioctls [Was: Revert "dm mpath: fix stalls when handling invalid ioctls"]

2015-10-31 Thread Mike Snitzer
On Sat, Oct 31 2015 at 2:13P -0400, Mike Snitzer wrote: > On Sat, Oct 31 2015 at 11:33am -0400, > Paolo Bonzini wrote: > > > > > > > On 29/10/2015 14:18, Mike Snitzer wrote: > > > > 4) dmesg shows that scsi_verify_blk_ioctl() failed for SG_IO (0x22

  1   2   3   >