Re: [PATCH 32/32] target: Increase MAX_LUNS_PER_TPG to 16384

2013-12-16 Thread Hannes Reinecke
On 12/14/2013 12:59 AM, Andy Grover wrote: Indicate support for hierarchical LUN addressing. Set address method field in each LUN reported by REPORT LUNS to 1, in accordance with SCSI SAM specs. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_spc.c |8

Re: [PATCH 32/32] target: Increase MAX_LUNS_PER_TPG to 16384

2013-12-16 Thread Hannes Reinecke
On 12/16/2013 10:20 AM, Hannes Reinecke wrote: On 12/14/2013 12:59 AM, Andy Grover wrote: Indicate support for hierarchical LUN addressing. Set address method field in each LUN reported by REPORT LUNS to 1, in accordance with SCSI SAM specs. Signed-off-by: Andy Grover agro...@redhat.com

RE: Possible locking bug in pm8xxx/pm8001

2013-12-16 Thread Suresh Thiagarajan
Jason, I have sent you the patch for testing. Could you please help testing this patch? Will submit it here once it is tested by you. Regards, Suresh -Original Message- From: Suresh Thiagarajan [mailto:sureshka...@gmail.com] Sent: Wednesday, November 27, 2013 11:11 AM To: Jason Seba

[PATCH 14/24] qla4xxx: Driver not able to collect minidump for ISP84xx

2013-12-16 Thread vikas.chaudhary
From: Tej Parkash tej.park...@qlogic.com Issue: minidump data collection fails as driver reports data mismatch Fix: When the driver encounters a new entry type that it cannot process, it should just skip the entry and adjust the total buffer size by subtracting the skipped bytes from it. This is

[PATCH 15/24] qla4xxx: Reduce rom-lock contention during reset recovery.

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Issue: Driver holds rom-lock for too long during reset recovery. During adapter reset testing, it was found that the driver holds the rom-lock for too long, because of which other drivers fail to acquire the rom-lock, leading to reset failures.

[PATCH 11/24] qla4xxx: Fix failure of IDC Time Extend mailbox command

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Issue: Mailbox command 0x102 (IDC Time Extend) failure seen while applying changes to iface using iscsiadm Fix: Added fix to extend IDC timeout only for ISP84xx when IDC ACK needs to be posted and disable ACB mailbox command completion is in

[PATCH 13/24] qla4xxx: Fix pending IO completion in reset path before initiating chip reset

2013-12-16 Thread vikas.chaudhary
From: Tej Parkash tej.park...@qlogic.com Issue: Pending IO wait does not complete after triggering Graceful reset, causing ack timeout and call traces. Fix: 1. Reducing the IO command wait timeout before triggering reset, as logically also timeout should be less than reset timeout (10sec). 2.

[PATCH 07/24] qla4xxx: Correctly handle msleep_interruptible

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com If waiting for signals was interrupted then the device was put to FAILED state. Use msleep instead of msleep_interruptible to handle this correctly. Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_nx.c | 10

[PATCH 24/24] qla4xxx: Update driver version to 5.04.00-k4

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla4xxx/ql4_version.h b/drivers/scsi/qla4xxx/ql4_version.h index

[PATCH 09/24] qla4xxx: Return correct error status from func qla4xxx_request_irqs()

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_isr.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index

[PATCH 01/24] qla4xxx: ISP8xxx: Correct retry of adapter initialization

2013-12-16 Thread vikas.chaudhary
From: Nilesh Javali nilesh.jav...@qlogic.com Issue: For ISP8xxx, adapter initialization is not retried if qla4xxx_initialize_adapter fails. Fix: If qla4xxx_initialize_adapter fails, first check if failure is due to IRQs not attached in order to skip retrial, then free the IRQs and then retry

[PATCH 03/24] qla4xxx: Fix comments in code

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_def.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index

[PATCH 23/24] qla4xxx: Fix sparse warnings

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Fix following sparse warnings:- drivers/scsi/qla4xxx/ql4_os.c:2109:33: warning: cast truncates bits from constant value (7fff becomes 7fff) drivers/scsi/qla4xxx/ql4_os.c:2306:33: warning: cast truncates bits from constant value (7fff

[PATCH 18/24] qla4xxx: Updated print for device login, logout path

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_os.c | 59 +++ 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c

[PATCH 16/24] qla4xxx: Fix failure of mbox 0x31

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Issue: While unloading driver MBOX 0x31 fail as DDB logout (MBOX 0x56) operation is not completed. Fix: Wait for DDB Logout completion before MBOX 0x31 Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_os.c |

[PATCH 17/24] qla4xxx: Remove unused code from qla4xxx_set_ifcb()

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Removing unused code as FW does not need any value in mbox-5. Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_mbx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c

[PATCH 04/24] qla4xxx: Use IDC_CTRL bit1 directly instead of AF_83XX_NO_FWDUMP flag.

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Removed AF_83XX_NO_FWDUMP flag and directly checking IDC_CTRL bit1 while taking minidump, to check for graceful reset. Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_83xx.c | 16 ++--

[PATCH 08/24] qla4xxx: Fixed AER reset sequence for ISP83xx/ISP84xx

2013-12-16 Thread vikas.chaudhary
From: Tej Parkash tej.park...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_def.h | 3 ++- drivers/scsi/qla4xxx/ql4_os.c | 46 +- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git

[PATCH 22/24] qla4xxx: Handle IPv6 AEN notifications

2013-12-16 Thread vikas.chaudhary
From: Nilesh Javali nilesh.jav...@qlogic.com Signed-off-by: Nilesh Javali nilesh.jav...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_fw.h | 6 +++--- drivers/scsi/qla4xxx/ql4_isr.c | 30 ++ 2 files changed, 33

[PATCH 05/24] qla4xxx: Improve loopback failure messages

2013-12-16 Thread vikas.chaudhary
From: Nilesh Javali nilesh.jav...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_bsg.c b/drivers/scsi/qla4xxx/ql4_bsg.c index 04a0027..9f92cbf

[PATCH 06/24] qla4xxx: Rename ACB_STATE macros with IP_ADDRSTATE macros

2013-12-16 Thread vikas.chaudhary
From: Nilesh Javali nilesh.jav...@qlogic.com Signed-off-by: Nilesh Javali nilesh.jav...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_fw.h | 24 drivers/scsi/qla4xxx/ql4_isr.c | 14 +++--- 2 files changed, 15

[PATCH 0/24] qla4xxx: 5.04.00-k4: Updates for scsi misc branch

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com James, Please apply the following patches to the scsi tree at your earliest convenience. These patches are on top of other qla4xxx patch posted on list here: http://marc.info/?l=linux-scsim=138511809612830w=2 Nilesh Javali (5): qla4xxx:

[PATCH 02/24] qla4xxx: Print WARN_ONCE() if iSCSI function presence bit removed

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_83xx.c | 20 drivers/scsi/qla4xxx/ql4_glbl.h | 1 + drivers/scsi/qla4xxx/ql4_os.c | 5 + 3 files changed, 26 insertions(+) diff

[PATCH 10/24] qla4xxx: Clear DDB index map upon connection close failure

2013-12-16 Thread vikas.chaudhary
From: Nilesh Javali nilesh.jav...@qlogic.com Issue: qla4xxx Unable to clear DDB indices when logout fails due to failure of connection close mbox command. Root cause: If login to session fail, iscsiadm make call to destroy_session. qla4xxx driver does not free ddb index map before free_ddb()

[PATCH 20/24] qla4xxx: Update print statements in func qla4xxx_eh_abort()

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_os.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index

[PATCH 19/24] qla4xxx: Update print statements in qla4xxx_mailbox_command()

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_mbx.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index

[PATCH 12/24] qla4xxx: Fix processing response queue during probe

2013-12-16 Thread vikas.chaudhary
From: Tej Parkash tej.park...@qlogic.com Issue: While booting with kdump kernel, driver receive IOCB interrupts for which it is not ready which results in processing them before init_firmware during driver probe Fix: Two steps solution 1. Make driver ready to process the interrupt before

[PATCH 21/24] qla4xxx: Update print statements in func qla4xxx_do_dpc()

2013-12-16 Thread vikas.chaudhary
From: Vikas Chaudhary vikas.chaudh...@qlogic.com Signed-off-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index

[RFC 0/2] target refcounting infrastructure fixes for usb

2013-12-16 Thread James Bottomley
This set should fix our target problems with USB by making the target visibility properly reference counted. Since it's a major change to the infrastructure, we'll incubate upstream first before backporting to stable. James --- James Bottomley (2): [SCSI] fix our current target reap

[RFC 1/2] fix our current target reap infrastructure.

2013-12-16 Thread James Bottomley
This patch eliminates the reap_ref and replaces it with a proper kref. On last put of this kref, the target is removed from visibility in sysfs. The final call to scsi_target_reap() for the device is done from __scsi_remove_device() and only if the device was made visible. This ensures that the

[RFC 2/2] dual scan thread bug fix

2013-12-16 Thread James Bottomley
In the highly unusual case where two threads are running concurrently through the scanning code scanning the same target, we run into the situation where one may allocate the target while the other is still using it. In this case, because the reap checks for STARGET_CREATED and kills the target

Re: [RFC 1/2] fix our current target reap infrastructure.

2013-12-16 Thread Alan Stern
On Mon, 16 Dec 2013, James Bottomley wrote: This patch eliminates the reap_ref and replaces it with a proper kref. On last put of this kref, the target is removed from visibility in sysfs. The final call to scsi_target_reap() for the device is done from __scsi_remove_device() and only if the

Re: [PATCH 1/3] st.ko: fix enlarge_buffer

2013-12-16 Thread Kai Mäkisara (Kolumbus)
On 2.12.2013, at 21.00, Bodo Stroesser bstroes...@ts.fujitsu.com wrote: From: Bodo Stroesser bstroes...@ts.fujitsu.com Date: Mon, 2 Dec 2013 18:52:10 +0100 Subject: [PATCH 1/3] st.ko: fix enlarge_buffer This patch removes a bug in enlarge_buffer() that can make a read or write fail under

Re: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer

2013-12-16 Thread Kai Mäkisara (Kolumbus)
On 2.12.2013, at 21.00, Bodo Stroesser bstroes...@ts.fujitsu.com wrote: From: Bodo Stroesser bstroes...@ts.fujitsu.com Date: Mon, 2 Dec 2013 18:52:10 +0100 Subject: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer This patch removes an unnecessary call to normalize_buffer() in

Re: [PATCH 3/3] st.ko: change enlarge_buffer result

2013-12-16 Thread Kai Mäkisara (Kolumbus)
On 2.12.2013, at 21.00, Bodo Stroesser bstroes...@ts.fujitsu.com wrote: From: Bodo Stroesser bstroes...@ts.fujitsu.com Date: Mon, 2 Dec 2013 18:52:10 +0100 Subject: [PATCH 3/3] st.ko: change enlarge_buffer result enlarge_buffer() just returns 1 or 0 if it could or could not allocate the

RE: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer

2013-12-16 Thread Strösser , Bodo
-Original Message- From: Kai Mäkisara (Kolumbus) [mailto:kai.makis...@kolumbus.fi] Sent: Monday, December 16, 2013 7:45 PM To: Strösser, Bodo Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH 2/3] st.ko: remove unnecessary normalize_buffer On 2.12.2013, at 21.00, Bodo Stroesser

RE: [PATCH 3/3] st.ko: change enlarge_buffer result

2013-12-16 Thread Strösser , Bodo
-Original Message- From: Kai Mäkisara (Kolumbus) [mailto:kai.makis...@kolumbus.fi] Sent: Monday, December 16, 2013 7:49 PM To: Strösser, Bodo Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH 3/3] st.ko: change enlarge_buffer result On 2.12.2013, at 21.00, Bodo Stroesser

Re: [PATCH] iscsi_target: race condition on shutdown

2013-12-16 Thread Nicholas A. Bellinger
Hey Hannes, On Thu, 2013-12-12 at 09:05 +0100, Hannes Reinecke wrote: On 12/12/2013 08:54 AM, Nicholas A. Bellinger wrote: On Thu, 2013-12-12 at 08:18 +0100, Hannes Reinecke wrote: [ .. ] SNIP Mmmm, point taken.. I would love to be proven wrong, as I'm not keen on the 'schedule()'

Re: [PATCH 01/32] target: Remove unused ua_dev_list member in struct se_ua

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Initialized but not used. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_ua.c |1 - include/target/target_core_base.h |1 - 2 files changed, 0 insertions(+), 2 deletions(-) Applied to

Re: [PATCH 02/32] target: Don't keep looping in report_luns if too big

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: All further loops will still fail the conditional so just bail right away. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_spc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 03/32] target: Allocate more room for port default groups

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: See target_stat_setup_port_default_groups, we need a 4 element array. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_fabric_configfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [PATCH 04/32] target: Fix sizeof in kmalloc for some default_groups arrays

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Allocating an array of pointers, not the objects themselves. These two sites now match all the other sites. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_configfs.c|2 +-

Re: [PATCH 05/32] target: Rename some list heads used as nodes

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Since everything's a list_head, naming it _node makes it clearer it's to put the struct on a list, not a list head itself. Rename ua_nacl_list to ua_nacl_node Rename alua_port_list to alua_port_node Rename lu_gp_mem_list to

Re: [PATCH 06/32] target: Convert lu_gp_ref_cnt to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Use kref to handle reference counting Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_alua.c | 37 - include/target/target_core_base.h |2 +- 2 files changed, 21

Re: [PATCH 07/32] target: Convert struct alua_lu_gp_member to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_alua.c | 24 +++- include/target/target_core_base.h |2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git

Re: [PATCH 09/32] target: convert tg_pt_gp_mem_ref_cnt to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Use kref to handle reference counting. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_alua.c | 23 ++- include/target/target_core_base.h |2 +- 2 files changed, 15 insertions(+),

Re: [PATCH 10/32] target: Change sep_tg_pt_ref_cnt to use kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Use the kernel's std kref for refcounting. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_device.c | 12 ++-- drivers/target/target_core_internal.h | 10 ++

Re: [PATCH 11/32] target: Convert se_dev_entry to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_device.c | 12 +++--- drivers/target/target_core_internal.h | 12 ++ drivers/target/target_core_pr.c | 38

Re: [PATCH 12/32] target: Convert t10_pr_registration to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Free struct when kref becomes 0. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_pr.c | 99 +++- include/target/target_core_base.h |2 +- 2 files changed, 42

Re: [PATCH 15/32] target: Refer to u32 luns as unpacked_lun

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: It's clearer to refer to pointers to the struct se_lun as lun and the actual number itself as unpacked_lun. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_device.c | 16 1 files changed,

Re: [PATCH 14/32] target: Remove extra percpu_ref_init

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: lun-lun_ref is also initialized in core_tpg_post_addlun, so it doesn't need to be done in core_tpg_setup_virtual_lun0. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_tpg.c |4 1 files changed, 0

Re: [PATCH 16/32] target: Rename core_tpg_{pre,post}_addlun for clarity

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: pre is really an allocation function. The only time it isn't called is for virtual_lun0, which is statically allocated. Renaming that to alloc lets the other function not need to be post, and just be called core_tpg_add_lun.

Re: [PATCH 17/32] target: Don't use void* when passing dev in core_tpg_add_lun

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Especially since it's actually a device. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_internal.h |2 +- drivers/target/target_core_tpg.c |4 ++-- 2 files changed, 3 insertions(+), 3

Re: [PATCH 18/32] target: More core_dev_del cleanups

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: core_dev_del_lun needs no return value. Also change it to take a se_lun* instead of the unpacked lun. Rename core_tpg_pre_dellun to core_tpg_free_lun, and post_dellun to remove_lun. Swap the order they are called, and hold off on setting

Re: [PATCH 19/32] target: Convert to rbtree for se_dev_entry in se_node_acl

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Instead of an array, use a rbtree. Less memory use on average, and can allow 255 entries. We go from O(1) to O(log n) on lookups. If this shows up on profiling (it won't) then transition to other kernel lookup methods is straightforward

Re: [PATCH 21/32] target: Remove lun_link and device magic

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Not needed. Big NAK on this one. It most certainly is still required in order to prevent any random pointer from being passed into a configfs symlink sink for Port/LUN and MappedLUN creation. --nab Signed-off-by: Andy Grover

Re: [PATCH 20/32] target: Convert to rbtree for se_lun list in se_portal_group

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: As with previous commit, this results in less average memory use, and allows lun count to no longer be restrained by the array size. NAK for the same reasons as the previous patch. rbtree introduces many extra memory addresses for pointer

Re: [PATCH 25/32] target: Call remove_lun instead of del_lun in fabric_port_unlink

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: We want to be freeing the port here, not freeing the lun. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_fabric_configfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Skipping this one as

Re: [PATCH 24/32] target: Remove tpg from core_dev_export/unexport params

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: lun-lun_tpg should always be set. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_device.c | 17 +++-- drivers/target/target_core_internal.h |6 ++ drivers/target/target_core_tpg.c

Re: [PATCH 27/32] target: Move call to remove_lun to the release function from drop_link

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Configfs is still using the memory until release() is called, so it's not safe to free it in drop_link(). Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_fabric_configfs.c | 10 +- 1 files

Re: [PATCH 28/32] target: Convert acl_pr_ref_count to kref

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: In fabrics' drop_nodeacl function, do not kfree the nacl. We are now calling fabrics' tpg_release_fabric_acl later when its refcount goes to zero, which will kfree it. Signed-off-by: Andy Grover agro...@redhat.com ---

Re: [PATCH 29/32] target: Simplify params to core_tpg_del_initiator_node_acl

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: 'force' parameter is not used. tpg parameter is not needed, since we have acl-se_tpg. Signed-off-by: Andy Grover agro...@redhat.com --- Documentation/target/tcm_mod_builder.py |2 +- drivers/infiniband/ulp/srpt/ib_srpt.c

Re: [PATCH 30/32] target: Change nacl's session refcount to use existing refcount

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: core_tpg_del_initiator_node_acl is now safe to call with spinlocks, since it no longer potentially sleeps. Signed-off-by: Andy Grover agro...@redhat.com --- drivers/target/target_core_tpg.c | 10 --

Re: [PATCH 31/32] target: Don't release and re-acquire some spinlocks in loops

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Here are some instances where we're looping, but then dropping the spinlock around the loop in the loop, because we need to be able to sleep in the calls. Since everything is refcounted now, this should no longer be needed and we can just

Re: [PATCH 0/32] Refcounts and rbtrees to increase luns above 255

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Hi Nicholas, This patchset uses krefs to refcount structures shared across threads. LIO is full of these because configfs-based configuration actions can be removing an object, even while that object is being used by a SCSI command.

Re: [PATCH 32/32] target: Increase MAX_LUNS_PER_TPG to 16384

2013-12-16 Thread Nicholas A. Bellinger
On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Indicate support for hierarchical LUN addressing. Set address method field in each LUN reported by REPORT LUNS to 1, in accordance with SCSI SAM specs. Signed-off-by: Andy Grover agro...@redhat.com ---

[PATCH 0/6] Let sleeping disks lie

2013-12-16 Thread Phillip Susi
This is the set I currently have. I fixed libata to implement the REQUEST SENSE scsi command, and set up sd to use blk_pre_runtime_suspend to force the queue to the RPM_SUSPENDING state while issuing the REQUEST SENSE command to make sure other requests are blocked, then if REQUEST SENSE

[PATCH 3/6] libata: resume in the background

2013-12-16 Thread Phillip Susi
Don't block the resume path waiting for the disk to spin up. --- drivers/ata/libata-core.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8f856bb..4a28caf 100644 --- a/drivers/ata/libata-core.c +++

[PATCH 4/6] libata: don't start disks on resume

2013-12-16 Thread Phillip Susi
Disks with Power Up In Standby enabled that required the SET FEATURES command to start up were being issued the command during resume. Suppress this until the disk is actually accessed. --- drivers/ata/libata-core.c | 12 ++-- drivers/ata/libata-eh.c | 10 --

[PATCH 1/6] libata: use sleep instead of standby command

2013-12-16 Thread Phillip Susi
The ATA SLEEP mode saves some more power than SUSPEND, and has basically the same recovery time, so use it instead. --- drivers/ata/libata-scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index db6dfcf..f92eb21

[PATCH 2/6] libata: avoid waking disk for several commands

2013-12-16 Thread Phillip Susi
When a disk is in SLEEP mode it can not respond to any commands. Instead of waking up the sleeping disk, fake the commands. The commands include: CHECK POWER FLUSH CACHE SLEEP STANDBY IMMEDIATE IDENTIFY If we konw the disk is sleeping, we don't need to wake it up to to find out if it is in

[PATCH 5/6] sd: don't start disks on system resume

2013-12-16 Thread Phillip Susi
Instead of forcing a disk to start up with the START STOP UNIT command when the system resumes, let it stay asleep if runtime pm is enabled, and it will start the drive when it is accessed. Query the drive to see if it starts up on its own ( like most ATA disks do ) and update the runtime pm

[PATCH 6/6] libata: return power status in REQUEST SENSE command

2013-12-16 Thread Phillip Susi
SAT-3 says REQUEST SENSE should issue CHECK POWER and return a sense status indicating the drive's power status. --- drivers/ata/libata-scsi.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/ata/libata-scsi.c

Re: [PATCH 19/32] target: Convert to rbtree for se_dev_entry in se_node_acl

2013-12-16 Thread Andy Grover
On 12/16/2013 01:40 PM, Nicholas A. Bellinger wrote: On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Instead of an array, use a rbtree. Less memory use on average, and can allow 255 entries. We go from O(1) to O(log n) on lookups. If this shows up on profiling (it won't) then transition

Re: [PATCH 0/32] Refcounts and rbtrees to increase luns above 255

2013-12-16 Thread Andy Grover
On 12/16/2013 02:03 PM, Nicholas A. Bellinger wrote: On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Hi Nicholas, This patchset uses krefs to refcount structures shared across threads. LIO is full of these because configfs-based configuration actions can be removing an object, even while

Re: [PATCH 19/32] target: Convert to rbtree for se_dev_entry in se_node_acl

2013-12-16 Thread Nicholas A. Bellinger
On Mon, 2013-12-16 at 17:00 -0800, Andy Grover wrote: On 12/16/2013 01:40 PM, Nicholas A. Bellinger wrote: On Fri, 2013-12-13 at 15:59 -0800, Andy Grover wrote: Instead of an array, use a rbtree. Less memory use on average, and can allow 255 entries. We go from O(1) to O(log n) on lookups.

Re: [PATCH 0/32] Refcounts and rbtrees to increase luns above 255

2013-12-16 Thread Nicholas A. Bellinger
On Mon, 2013-12-16 at 17:49 -0800, Andy Grover wrote: On 12/16/2013 02:03 PM, Nicholas A. Bellinger wrote: On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote: Hi Nicholas, This patchset uses krefs to refcount structures shared across threads. LIO is full of these because

Re: [PATCH 0/32] Refcounts and rbtrees to increase luns above 255

2013-12-16 Thread Andy Grover
On 12/16/2013 05:59 PM, Nicholas A. Bellinger wrote: I do appreciate the effort, but the extra pointer chasing here makes rbtrees prohibitively expensive for fast past operations. Hmm, were they actually implemented and tried at some point? -- To unsubscribe from this list: send the line

Re: [PATCH 0/32] Refcounts and rbtrees to increase luns above 255

2013-12-16 Thread Nicholas A. Bellinger
On Mon, 2013-12-16 at 18:03 -0800, Andy Grover wrote: On 12/16/2013 05:59 PM, Nicholas A. Bellinger wrote: I do appreciate the effort, but the extra pointer chasing here makes rbtrees prohibitively expensive for fast past operations. Hmm, were they actually implemented and tried at some

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-12-16 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He

Re: [PATCH 16/20] qla2xxx: Simplyfy the ISPFX00 interrupt handler code for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Hi Bart, Thanks for the feedback, I will be submitting the updated patches soon. Thanks, ~Saurav On 12/13/13 21:03, Saurav Kashyap wrote: [ ... ] Shouldn't the subject of this patch read Simplify instead of Simplyfy ? Bart. attachment: winmail.dat

[PATCH V2 01/20] qla2xxx: Add mutex around optrom calls to serialize accesses.

2013-12-16 Thread Saurav Kashyap
From: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_attr.c | 61 ++ drivers/scsi/qla2xxx/qla_bsg.c | 12 ++-

[PATCH V2 14/20] qla2xxx: Add changes in the IOCB structures to adjust driver source codes to ISPFX00 firmware spec.

2013-12-16 Thread Saurav Kashyap
From: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c | 10 +- drivers/scsi/qla2xxx/qla_mr.h | 26 +- 2 files changed, 18

[PATCH V2 04/20] qla2xxx: Use proper message for Non owner reset ACK Timeout.

2013-12-16 Thread Saurav Kashyap
From: Atul Deshmukh atul.deshm...@qlogic.com Signed-off-by: Atul Deshmukh atul.deshm...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_nx2.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_nx2.c

[PATCH V2 03/20] qla2xxx: Replace constant value for IOCTL IOCB abort execution status with a macro for ISPFX00.

2013-12-16 Thread Saurav Kashyap
From: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c |3 ++- drivers/scsi/qla2xxx/qla_mr.h |3 +++ 2 files changed, 5 insertions(+), 1 deletions(-)

[PATCH V2 07/20] qla2xxx: Enable the Flash Access Control (FAC) mailbox command.

2013-12-16 Thread Saurav Kashyap
From: Joe Carnuccio joe.carnuc...@qlogic.com Signed-off-by: Joe Carnuccio joe.carnuc...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_init.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git

[PATCH V2 19/20] qla2xxx: Fix multiqueue MSI-X registration.

2013-12-16 Thread Saurav Kashyap
From: Chad Dupuis chad.dup...@qlogic.com This fixes requesting of the MSI-X vectors for the base response queue. The iteration in the for loop in qla24xx_enable_msix() was incorrect. We should only iterate of the first two MSI-X vectors and not the total number of MSI-X vectors that have given to

[PATCH V2 06/20] qla2xxx: Select correct request queue for error type IOCB for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index

[PATCH V2 20/20] qla2xxx: Update the driver version to 8.07.00.02-k.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com --- drivers/scsi/qla2xxx/qla_version.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h

[PATCH V2 10/20] scsi_transport_fc: Add 32Gbps speed definition.

2013-12-16 Thread Saurav Kashyap
From: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/scsi_transport_fc.c |1 + include/scsi/scsi_transport_fc.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff

[PATCH V2 16/20] qla2xxx: Simplify the ISPFX00 interrupt handler code for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c | 25 + drivers/scsi/qla2xxx/qla_mr.h |4 2 files changed, 9 insertions(+), 20 deletions(-) diff --git

[PATCH V2 05/20] qla2xxx: Remove init control block related dead code for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_def.h | 24 drivers/scsi/qla2xxx/qla_mr.c | 14 -- drivers/scsi/qla2xxx/qla_os.c |1 - 3 files changed,

[PATCH V2 18/20] qla2xxx: Correctly set the read_optrom pointer for ISP8044.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_os.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index

[PATCH V2 02/20] qla2xxx: Add handling for boot indication progress AENs for ISPFX00.

2013-12-16 Thread Saurav Kashyap
From: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_def.h |2 +- drivers/scsi/qla2xxx/qla_mr.c |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-)

[PATCH V2 08/20] qla2xxx: Properly handle 32 bit mailbox register for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c

[PATCH V2 09/20] qla2xxx: Set host can_queue value based on available resources.

2013-12-16 Thread Saurav Kashyap
From: Chad Dupuis chad.dup...@qlogic.com Tell the mid-layer that number of commands we can queue is the available resources we have minus a small amount for internal commands. Signed-off-by: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com ---

[PATCH V2 17/20] qla2xxx: Read capture firmware dump on mailbox timeout for ISP8044 and ISP82XX.

2013-12-16 Thread Saurav Kashyap
From: Chad Dupuis chad.dup...@qlogic.com Allow for the capture of a firmware dump but have a sysfs node (allow_cna_fw_dump) to allow the feature to be enabled/disabled dynamically. The default is off. Signed-off-by: Chad Dupuis chad.dup...@qlogic.com Signed-off-by: Saurav Kashyap

[PATCH V2 12/20] qla2xxx: Remove Marker type IOCB logic for ISPFX00.

2013-12-16 Thread Saurav Kashyap
From: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Armen Baloyan armen.balo...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_iocb.c | 11 +-- drivers/scsi/qla2xxx/qla_mr.c | 12 drivers/scsi/qla2xxx/qla_mr.h

[PATCH V2 15/20] qla2xxx: Avoid poisoning in the response queue for ISPFX00.

2013-12-16 Thread Saurav Kashyap
Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Saurav Kashyap saurav.kash...@qlogic.com --- drivers/scsi/qla2xxx/qla_mr.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mr.c

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-12-16 Thread Jason Wang
On 12/17/2013 11:09 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after

  1   2   >