[PATCH][SCSI] mpt2sas: fix undefined reference to `__udivdi3' compilation errors

2014-09-19 Thread Sreekanth Reddy
This patch will fix the below compilation errors on i386 ARCH drivers/built-in.o: In function `_scsih_qcmd': mpt2sas_scsih.c:(.text+0x1e7b56): undefined reference to `__udivdi3' mpt2sas_scsih.c:(.text+0x1e7b8a): undefined reference to `__umoddi3' Used sector_div() API to fix above compilation

Re: [PATCH 20/22] scsi: align logging messages

2014-09-19 Thread Christoph Hellwig
On Fri, Sep 19, 2014 at 08:26:29AM +0200, Hannes Reinecke wrote: I would rather use 'scmd-tag', as this should be a straight copy of scmd-request-tag, but we wouldn't need to reference the request when doing so. Yes, for now scmd-tag is correct as drivers might not be using the block level

boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-19 Thread Christoph Hellwig
Hi Jens, hi Tejun, I've seen multi-second boot stalls in one of my KVM setups during the initial scsi scan: [0.949892] scsi host0: Virtio SCSI HBA [1.007864] scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK1.1. PQ: 0 ANSI: 5 [1.021299] scsi 0:0:1:0: Direct-Access QEMU

Re: [PATCH 20/22] scsi: align logging messages

2014-09-19 Thread Hannes Reinecke
On 09/19/2014 01:35 PM, Christoph Hellwig wrote: On Fri, Sep 19, 2014 at 08:26:29AM +0200, Hannes Reinecke wrote: I would rather use 'scmd-tag', as this should be a straight copy of scmd-request-tag, but we wouldn't need to reference the request when doing so. Yes, for now scmd-tag is correct

[PATCH RFC 0/8] IB/srp: Add multichannel support

2014-09-19 Thread Bart Van Assche
Hello, Although the SRP protocol supports multichannel operation, although since considerable time RDMA HCA's are available that support multiple completion vectors and although multichannel operation yields better performance than using a single channel, the Linux SRP initiator does not yet

Re: [PATCH RFC 0/8] IB/srp: Add multichannel support

2014-09-19 Thread Bart Van Assche
[PATCH 1/8] blk-mq: Use all available hardware queues Suppose that a system has two CPU sockets, three cores per socket, that it does not support hyperthreading and that four hardware queues are provided by a block driver. With the current algorithm this will lead to the following assignment of

[PATCH 2/8] scsi-mq: Add support for multiple hardware queues

2014-09-19 Thread Bart Van Assche
Allow a SCSI LLD to declare how many hardware queues it supports by setting Scsi_Host.nr_hw_queues before calling scsi_add_host(). Note: it is assumed that each hardware queue has a queue depth of shost-can_queue. In other words, the total queue depth per host is (number of hardware queues) *

[PATCH 3/8] scsi-mq: Pass hctx to low-level SCSI drivers

2014-09-19 Thread Bart Van Assche
Low-level drivers (LLDs) need to know which hardware context has been selected by the block layer. Hence pass this information to SCSI LLDs. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 7 +-- drivers/scsi/scsi_lib.c |

[PATCH 4/8] IB/srp: Move ib_destroy_cm_id() call into srp_free_ch_ib()

2014-09-19 Thread Bart Van Assche
The patch that adds multichannel support into the SRP initiator driver introduces an additional call to srp_free_ch_ib(). This patch helps to keep that later patch simple. Signed-off-by: Bart Van Assche bvanass...@acm.org --- drivers/infiniband/ulp/srp/ib_srp.c | 11 ++- 1 file changed,

[PATCH 5/8] IB/srp: Remove stale connection retry mechanism

2014-09-19 Thread Bart Van Assche
Attempting to connect three times may be insufficient after an initiator system that was using multiple RDMA channels tries to relogin. Additionally, this login retry mechanism is a workaround for particular behavior of the IB/CM. Since the srp_daemon retries a failed login attempt anyway, remove

[PATCH 6/8] IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning

2014-09-19 Thread Bart Van Assche
If a cable is pulled during LUN scanning it can happen that the SRP rport and the SCSI host have been created but no LUNs have been added to the SCSI host. Since multipathd only sends SCSI commands to a SCSI target if one or more SCSI devices are present and since there is no keepalive mechanism

[PATCH 7/8] IB/srp: Separate target and channel variables

2014-09-19 Thread Bart Van Assche
Changes in this patch: - Move channel variables into a new structure (struct srp_rdma_ch). - cm_id and completion handler context pointer are now of type srp_rdma_ch * insteoad of srp_target_port *. No functionality is changed. Signed-off-by: Bart Van Assche bvanass...@acm.org ---

[PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Bart Van Assche
Improve performance by using multiple RDMA/RC channels per SCSI host for communicating with an SRP target. Signed-off-by: Bart Van Assche bvanass...@acm.org --- Documentation/ABI/stable/sysfs-driver-ib_srp | 25 +- drivers/infiniband/ulp/srp/ib_srp.c | 337 ---

Re: [PATCH] scsi-mq: fix hw queue hang caused by timeout

2014-09-19 Thread Ming Lei
On Fri, Sep 19, 2014 at 1:03 AM, Jens Axboe ax...@fb.com wrote: On 2014-09-18 10:35, Christoph Hellwig wrote: On Thu, Sep 18, 2014 at 11:59:10PM +0800, Ming Lei wrote: If there are two requests or more timed out, the dispatch queue is put into stopped state and never be recoverd, and there

[GIT PULL] SCSI fixes for 3.17-rc5

2014-09-19 Thread James Bottomley
This is a set of three fixes. One represents a nasty shared tag map regression (another inverted condition) caused by recent SCSI MQ patches, one is a longstanding potential buffer overrun in the iscsi data buffer and the final one is a use after free for the rare bidirectional commands. The

Re: [PATCH] scsi-mq: fix hw queue hang caused by timeout

2014-09-19 Thread Ming Lei
On Fri, Sep 19, 2014 at 9:07 PM, Ming Lei ming@canonical.com wrote: On Fri, Sep 19, 2014 at 1:03 AM, Jens Axboe ax...@fb.com wrote: On 2014-09-18 10:35, Christoph Hellwig wrote: On Thu, Sep 18, 2014 at 11:59:10PM +0800, Ming Lei wrote: If there are two requests or more timed out, the

Re: [PATCH] scsi-mq: fix hw queue hang caused by timeout

2014-09-19 Thread Jens Axboe
On 09/19/2014 08:18 AM, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:07 PM, Ming Lei ming@canonical.com wrote: On Fri, Sep 19, 2014 at 1:03 AM, Jens Axboe ax...@fb.com wrote: On 2014-09-18 10:35, Christoph Hellwig wrote: On Thu, Sep 18, 2014 at 11:59:10PM +0800, Ming Lei wrote: If there

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Ming Lei
On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche bvanass...@acm.org wrote: Improve performance by using multiple RDMA/RC channels per SCSI host for communicating with an SRP target. Signed-off-by: Bart Van Assche bvanass...@acm.org --- Documentation/ABI/stable/sysfs-driver-ib_srp | 25 +-

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Bart Van Assche
On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche bvanass...@acm.org wrote: @@ -2643,7 +2754,8 @@ static struct scsi_host_template srp_template = { .proc_name = DRV_NAME, .slave_configure=

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Ming Lei
On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche bvanass...@acm.org wrote: @@ -2643,7 +2754,8 @@ static struct scsi_host_template srp_template = { .proc_name

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Bart Van Assche
On 09/19/14 17:27, Ming Lei wrote: On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche bvanass...@acm.org wrote: @@ -2643,7 +2754,8 @@ static struct scsi_host_template srp_template =

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Jens Axboe
On 09/19/2014 09:35 AM, Bart Van Assche wrote: On 09/19/14 17:27, Ming Lei wrote: On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche bvanass...@acm.org wrote: @@ -2643,7 +2754,8 @@

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 6:38 PM, Jens Axboe wrote: On 09/19/2014 09:35 AM, Bart Van Assche wrote: On 09/19/14 17:27, Ming Lei wrote: On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Jens Axboe
On 09/19/2014 11:30 AM, Sagi Grimberg wrote: On 9/19/2014 6:38 PM, Jens Axboe wrote: On 09/19/2014 09:35 AM, Bart Van Assche wrote: On 09/19/14 17:27, Ming Lei wrote: On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep

Re: [PATCH RFC 0/8] IB/srp: Add multichannel support

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:56 PM, Bart Van Assche wrote: [PATCH 1/8] blk-mq: Use all available hardware queues Suppose that a system has two CPU sockets, three cores per socket, that it does not support hyperthreading and that four hardware queues are provided by a block driver. With the current

Re: [PATCH 2/8] scsi-mq: Add support for multiple hardware queues

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:57 PM, Bart Van Assche wrote: Allow a SCSI LLD to declare how many hardware queues it supports by setting Scsi_Host.nr_hw_queues before calling scsi_add_host(). Note: it is assumed that each hardware queue has a queue depth of shost-can_queue. In other words, the total queue

Re: [PATCH 4/8] IB/srp: Move ib_destroy_cm_id() call into srp_free_ch_ib()

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:58 PM, Bart Van Assche wrote: The patch that adds multichannel support into the SRP initiator driver introduces an additional call to srp_free_ch_ib(). This patch helps to keep that later patch simple. Signed-off-by: Bart Van Assche bvanass...@acm.org ---

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Christoph Hellwig
On Fri, Sep 19, 2014 at 11:33:15AM -0600, Jens Axboe wrote: That'd be fine as well. The mapping is cheap, though, but it would make sense to have an appropriate way to just pass it in like it happens for -queue_rq() for native blk-mq drivers. I think just passing the hw_ctx is fine. But I

Re: [PATCH 2/8] scsi-mq: Add support for multiple hardware queues

2014-09-19 Thread Christoph Hellwig
On Fri, Sep 19, 2014 at 09:05:53PM +0300, Sagi Grimberg wrote: I think this patch should be squashed with passing LLD hctx patch (in whatever form it ends up). Agreed. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org

Re: [PATCH 5/8] IB/srp: Remove stale connection retry mechanism

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:58 PM, Bart Van Assche wrote: Attempting to connect three times may be insufficient after an initiator system that was using multiple RDMA channels tries to relogin. Additionally, this login retry mechanism is a workaround for particular behavior of the IB/CM. Since the

Re: [PATCH RFC 0/8] IB/srp: Add multichannel support

2014-09-19 Thread Jens Axboe
On 09/19/2014 06:55 AM, Bart Van Assche wrote: Hello, Although the SRP protocol supports multichannel operation, although since considerable time RDMA HCA's are available that support multiple completion vectors and although multichannel operation yields better performance than using a

Re: [PATCH 7/8] IB/srp: Separate target and channel variables

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:59 PM, Bart Van Assche wrote: Changes in this patch: - Move channel variables into a new structure (struct srp_rdma_ch). - cm_id and completion handler context pointer are now of type srp_rdma_ch * insteoad of srp_target_port *. s/insteoad/instead No functionality is

Re: boot stall regression due to blk-mq: use percpu_ref for mq usage count

2014-09-19 Thread Jens Axboe
On 09/19/2014 05:38 AM, Christoph Hellwig wrote: Hi Jens, hi Tejun, I've seen multi-second boot stalls in one of my KVM setups during the initial scsi scan: [0.949892] scsi host0: Virtio SCSI HBA [1.007864] scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK1.1. PQ: 0

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Nicholas A. Bellinger
Hi Andy, A few comments are inline below. On Mon, 2014-09-15 at 16:12 -0700, Andy Grover wrote: Add a LIO storage engine that presents commands to userspace for execution. This would allow more complex backstores to be implemented out-of-kernel, and also make experimentation a-la FUSE (but at

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Alex Elsayed
Nicholas A. Bellinger wrote: snip So the idea of allowing the in-kernel CDB emulation to run after user-space has returned unsupported opcode is problematic for a couple of different reasons. First, if the correct feature bits in standard INQUIRY + EVPD INQUIRY, etc are not populated by

[GIT PULL] target fixes for v3.17-rc6

2014-09-19 Thread Nicholas A. Bellinger
Hi Linus, Here are the target pending fixes for v3.17-rc6. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master Included are Sagi's long overdue fixes related to iser-target shutdown, along with a couple of fixes from Sebastian related to ALUA

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Nicholas A. Bellinger
On Fri, 2014-09-19 at 14:43 -0700, Alex Elsayed wrote: Nicholas A. Bellinger wrote: snip So the idea of allowing the in-kernel CDB emulation to run after user-space has returned unsupported opcode is problematic for a couple of different reasons. First, if the correct feature bits

[PATCH] scsi: fix kconfig dependency warnings for SCSI_FC_ATTRS

2014-09-19 Thread Randy Dunlap
From: Randy Dunlap rdun...@infradead.org Fix kconfig dependency warnings which can lead to build errors: warning: (SCSI_BNX2X_FCOE LIBFCOE TCM_QLA2XXX) selects LIBFC which has unmet direct dependencies (SCSI_LOWLEVEL SCSI SCSI_FC_ATTRS) warning: (FCOE FCOE_FNIC) selects LIBFCOE which has

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Alex Elsayed
Nicholas A. Bellinger wrote: On Fri, 2014-09-19 at 14:43 -0700, Alex Elsayed wrote: Nicholas A. Bellinger wrote: snip So the idea of allowing the in-kernel CDB emulation to run after user-space has returned unsupported opcode is problematic for a couple of different reasons.

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Andy Grover
On 09/19/2014 04:51 PM, Alex Elsayed wrote: Not sure I follow.. How does the proposed passthrough mode prevent someone from emulating OSDs, media changers, optical disks or anything else in userspace with TCMU..? The main thing that the above comments highlight is why attempting to combine