Re: [REPOST PATCH 1/5] scsi: bnx2i: convert to kworker

2016-09-30 Thread Sebastian Andrzej Siewior
On 2016-09-14 13:25:12 [-0400], Martin K. Petersen wrote: > > "Chad" == Chad Dupuis writes: > > Chad> We're regression testing the patches now. Please hold off on > Chad> applying them. > > OK. I will wait. Chad, any updates on this tests? Sebastian -- To unsubscribe from this list: send

[PATCH v6 6/7] sd: Implement support for ZBC devices

2016-09-30 Thread Shaun Tancheff
From: Hannes Reinecke Implement ZBC support functions to setup zoned disks, both host-managed and host-aware models. Only zoned disks that satisfy the following conditions are supported: 1) All zones are the same size, with the exception of an eventual last smaller runt zone. 2) For host-manag

[PATCH v6 5/7] block: Implement support for zoned block devices

2016-09-30 Thread Shaun Tancheff
From: Hannes Reinecke Implement zoned block device zone information reporting and reset. Zone information are reported as struct blk_zone. This implementation does not differentiate between host-aware and host-managed device models and is valid for both. Two functions are provided: blkdev_report_

[PATCH v6 7/7] blk-zoned: implement ioctls

2016-09-30 Thread Shaun Tancheff
Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively obtaining the zone configuration of a zoned block device and resetting the write pointer of sequential zones of a zoned block device. The BLKREPORTZONE ioctl maps directly to a single call of the function blkdev_report_zones. The

[PATCH v6 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-30 Thread Shaun Tancheff
From: Hannes Reinecke The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH v6 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-30 Thread Shaun Tancheff
From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk

[PATCH v6 4/7] block: Define zoned block device operations

2016-09-30 Thread Shaun Tancheff
From: Shaun Tancheff Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of host-managed and host-aware zoned block devices. With with these two new operations, the total number of operations defined reaches 8 and still fits with the 3 bits definition of REQ_OP_BITS. Signed-off-by

[PATCH v6 1/7] block: Add 'zoned' queue limit

2016-09-30 Thread Shaun Tancheff
From: Damien Le Moal Add the zoned queue limit to indicate the zoning model of a block device. Defined values are 0 (BLK_ZONED_NONE) for regular block devices, 1 (BLK_ZONED_HA) for host-aware zone block devices and 2 (BLK_ZONED_HM) for host-managed zone block devices. The standards defined drive

[PATCH v6 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
This series introduces support for zoned block devices. It integrates earlier submissions by Hannes Reinecke, Damien Le Moal and Shaun Tancheff. Compared to the previous series version, the code was significantly simplified by limiting support to zoned devices satisfying the following conditions: 1

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
Hello Bart, I rebased this series on Jens for-4.9/block and will repost. Thanks! --Shaun On Fri, Sep 30, 2016 at 12:18 PM, Bart Van Assche wrote: > On 09/30/2016 09:47 AM, Shaun Tancheff wrote: >> On Fri, Sep 30, 2016 at 11:10 AM, Bart Van Assche >> wrote: >>> On 09/29/16 21:11, Damien Le Moal

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Bart Van Assche
On 09/30/2016 09:47 AM, Shaun Tancheff wrote: > On Fri, Sep 30, 2016 at 11:10 AM, Bart Van Assche > wrote: >> On 09/29/16 21:11, Damien Le Moal wrote: >>> This series introduces support for zoned block devices. >> >> On top of which kernel version do these patches apply? I tried to apply the >> wh

iscsi_trx going into D state

2016-09-30 Thread Robert LeBlanc
We are having a reoccurring problem where iscsi_trx is going into D state. It seems like it is waiting for a session tear down to happen or something, but keeps waiting. We have to reboot these targets on occasion. This is running the 4.4.12 kernel and we have seen it on several previous 4.4.x and

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
Hi Bart, This series is against linux-next tag next-20160928. You should be able to "git am" the series on top of that. Thanks! Shaun On Fri, Sep 30, 2016 at 11:10 AM, Bart Van Assche wrote: > On 09/29/16 21:11, Damien Le Moal wrote: >> >> This series introduces support for zoned block devices.

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Bart Van Assche
On 09/29/16 21:11, Damien Le Moal wrote: This series introduces support for zoned block devices. Hi Damien, On top of which kernel version do these patches apply? I tried to apply the whole series to kernel v4.7 but that caused "git am" to complain ... Thank you, Bart. -- To unsubscribe f

Re: [PATCH v2 4/7] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue()

2016-09-30 Thread Bart Van Assche
On 09/29/16 14:51, Ming Lei wrote: On Thu, Sep 29, 2016 at 7:59 AM, Bart Van Assche wrote: blk_quiesce_queue() prevents that new queue_rq() invocations blk_mq_quiesce_queue() Thanks, I will update the patch title and patch description. +void blk_mq_quiesce_queue(struct request_queue *q) +

Re: [PATCH 2/2] megaraid_sas: clean function declarations in megaraid_sas_fusion.c up

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Baoyou Xie wrote: > int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); > -void megaraid_sas_kill_hba(struct megasas_instance *instance); > > extern u32 megasas_dbg_lvl; > -void megasas_sriov_heartbeat_handler(unsigned long instance_addr); >

[PATCH 2/2] megaraid_sas: clean function declarations in megaraid_sas_fusion.c up

2016-09-30 Thread Baoyou Xie
We get 10 warnings when building kernel with W=1: drivers/scsi/megaraid/megaraid_sas_base.c:213:21: warning: no previous prototype for 'megasas_get_cmd' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:239:1: warning: no previous declaration for 'megasas_return_cmd' [-Wmissing-dec

[PATCH 1/2] megaraid_sas: mark symbols static where possible

2016-09-30 Thread Baoyou Xie
We get a few warnings when building kernel with W=1: drivers/scsi/megaraid/megaraid_sas_base.c:200:1: warning: no previous prototype for 'megasas_issue_dcmd' [-Wmissing-prototypes] drivers/scsi/megaraid/megaraid_sas_base.c:2047:6: warning: no previous prototype for 'megasas_do_ocr' [-Wmissing-pro

[PATCHv2 6/7] libfc: don't advance state machine for incoming FLOGI

2016-09-30 Thread Hannes Reinecke
When we receive an FLOGI but have already sent our own we should not advance the state machine but rather wait for our FLOGI to return before continuing with PLOGI. Signed-off-by: Hannes Reinecke Acked-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_rport.c | 20 ++-- 1 file ch

[PATCHv2 1/7] libfc: Revisit kref handling

2016-09-30 Thread Hannes Reinecke
The kref handling in fc_rport is a mess. This patch updates the kref handling according to the following rules: - Take a reference whenever scheduling a workqueue - Take a reference whenever an ELS command is send - Drop the reference at the end of the workqueue function - Drop the reference at th

[PATCHv2 0/7] libfc: sanitize kref and state machine fixes

2016-09-30 Thread Hannes Reinecke
Hi all, here is the first round of patch to fixup libfc and FCoE. It consists of a rewrite of the libfc rport kref handling (or, to be precise, is _implements_ rport kref handling) and updates the 'disc_mutex' handling to match the new kref usage. There are also some state machine fixes to handle

[PATCHv2 7/7] fcoe: Harden CVL handling when we have not logged into the fabric.

2016-09-30 Thread Hannes Reinecke
From: Chad Dupuis If we haven't logged into the fabric yet we want to be a little more nuanced with our CVL handling than what we've been: - If the FCF has been selected, check the source MAC to make sure the frame is from the FCF we've selected. - If a FCF is selected and the CVL is from the FC

[PATCHv2 4/7] libfc: Do not drop down to FLOGI for fc_rport_login()

2016-09-30 Thread Hannes Reinecke
When fc_rport_login() is called while the rport is not in RPORT_ST_INIT, RPORT_ST_READY, or RPORT_ST_DELETE login is already in progress and there's no need to drop down to FLOGI; doing so will only confuse the other side. Signed-off-by: Hannes Reinecke Acked-by: Johannes Thumshirn --- drivers/

[PATCHv2 3/7] libfc: Do not take rdata->rp_mutex when processing a -FC_EX_CLOSED ELS response.

2016-09-30 Thread Hannes Reinecke
From: Chad Dupuis When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is already held which can lead to a deadlock condition like the following stack trace: [] fc_rport_plogi_resp+0x28/0x200 [libfc] [] fc_invoke_resp+0x6a/0xe0 [libfc] [] fc_exch_mgr_reset+0x1b8/0x280 [lib

[PATCHv2 5/7] libfc: Do not login if the port is already started

2016-09-30 Thread Hannes Reinecke
When the port is already started we don't need to login; that will only confuse the state machine. Signed-off-by: Hannes Reinecke Acked-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_rport.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi

[PATCHv2 2/7] libfc: Fixup disc_mutex handling

2016-09-30 Thread Hannes Reinecke
The list of attached 'rdata' remote port structures is RCU protected, so there is no need to take the 'disc_mutex' when traversing it. Rather we should be using rcu_read_lock() and kref_get_unless_zero() to validate the entries. We need, however, take the disc_mutex when deleting an entry; otherwis

[PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-09-30 Thread Wei Fang
->host_eh_schedule and ->shost_state may be accessed simultaneously as bellow: 1.In ata port probe path: ata_std_sched_eh() scsi_schedule_eh() ... spin_lock_irqsave(shost->host_lock, flags); if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0

Re: [PATCH 7/7] fcoe: Harden CVL handling when we have not logged into the fabric.

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 09:04:14AM +0200, Hannes Reinecke wrote: > From: Chad Dupuis > > If we haven't logged into the fabric yet we want to be a little more nuanced > with our CVL handling than what we've been: > > - If the FCF has been selected, check the source MAC to make sure the frame is >

Re: [PATCH 4/7] libfc: Do not drop down to FLOGI for fc_rport_login()

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 09:04:11AM +0200, Hannes Reinecke wrote: > When fc_rport_login() is called while the rport is not > in RPORT_ST_INIT, RPORT_ST_READY, or RPORT_ST_DELETE > login is already in progress and there's no need to > drop down to FLOGI; doing so will only confuse the > other side. >

Re: [PATCH 3/7] libfc: Do not take rdata->rp_mutex when processing a -FC_EX_CLOSED ELS response.

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 09:04:10AM +0200, Hannes Reinecke wrote: > From: Chad Dupuis > > When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is > already held which can lead to a deadlock condition like the following stack > trace: > > [] fc_rport_plogi_resp+0x28/0x200 [l

Re: [PATCH 2/7] libfc: Fixup disc_mutex handling

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 09:04:09AM +0200, Hannes Reinecke wrote: > The list of attached 'rdata' remote port structures is RCU > protected, so there is no need to take the 'disc_mutex' when > traversing it. > Rather we should be using rcu_read_lock() and kref_get_unless_zero() > to validate the entr

Re: [PATCH 1/7] libfc: Revisit kref handling

2016-09-30 Thread Johannes Thumshirn
On Fri, Sep 30, 2016 at 09:04:08AM +0200, Hannes Reinecke wrote: > The kref handling in fc_rport is a mess. This patch updates > the kref handling according to the following rules: > > - Take a reference whenever scheduling a workqueue > - Take a reference whenever an ELS command is send > - Drop

Re: [PATCH v5 7/7] blk-zoned: implement ioctls

2016-09-30 Thread Hannes Reinecke
On 09/30/2016 06:11 AM, Damien Le Moal wrote: From: Shaun Tancheff Adds the new BLKREPORTZONE and BLKRESETZONE ioctls for respectively obtaining the zone configuration of a zoned block device and resetting the write pointer of sequential zones of a zoned block device. The BLKREPORTZONE ioctl m

Re: [PATCH v5 4/7] block: Define zoned block device operations

2016-09-30 Thread Hannes Reinecke
On 09/30/2016 06:11 AM, Damien Le Moal wrote: From: Shaun Tancheff Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of host-managed and host-aware zoned block devices. With with these two new operations, the total number of operations defined reaches 8 and still fits with the

[PATCH 6/7] libfc: don't advance state machine for incoming FLOGI

2016-09-30 Thread Hannes Reinecke
When we receive an FLOGI but have already sent our own we should not advance the state machine but rather wait for our FLOGI to return before continuing with PLOGI. Signed-off-by: Hannes Reinecke Acked-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_rport.c | 20 ++-- 1 file ch

[PATCH 5/7] libfc: Do not login if the port is already started

2016-09-30 Thread Hannes Reinecke
When the port is already started we don't need to login; that will only confuse the state machine. Signed-off-by: Hannes Reinecke Acked-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_rport.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi

[PATCH 2/7] libfc: Fixup disc_mutex handling

2016-09-30 Thread Hannes Reinecke
The list of attached 'rdata' remote port structures is RCU protected, so there is no need to take the 'disc_mutex' when traversing it. Rather we should be using rcu_read_lock() and kref_get_unless_zero() to validate the entries. We need, however, take the disc_mutex when deleting an entry; otherwis

[PATCH 3/7] libfc: Do not take rdata->rp_mutex when processing a -FC_EX_CLOSED ELS response.

2016-09-30 Thread Hannes Reinecke
From: Chad Dupuis When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is already held which can lead to a deadlock condition like the following stack trace: [] fc_rport_plogi_resp+0x28/0x200 [libfc] [] fc_invoke_resp+0x6a/0xe0 [libfc] [] fc_exch_mgr_reset+0x1b8/0x280 [lib

[PATCH 7/7] fcoe: Harden CVL handling when we have not logged into the fabric.

2016-09-30 Thread Hannes Reinecke
From: Chad Dupuis If we haven't logged into the fabric yet we want to be a little more nuanced with our CVL handling than what we've been: - If the FCF has been selected, check the source MAC to make sure the frame is from the FCF we've selected. - If a FCF is selected and the CVL is from the FC

[PATCH 1/7] libfc: Revisit kref handling

2016-09-30 Thread Hannes Reinecke
The kref handling in fc_rport is a mess. This patch updates the kref handling according to the following rules: - Take a reference whenever scheduling a workqueue - Take a reference whenever an ELS command is send - Drop the reference at the end of the workqueue function - Drop the reference at th

[PATCH 4/7] libfc: Do not drop down to FLOGI for fc_rport_login()

2016-09-30 Thread Hannes Reinecke
When fc_rport_login() is called while the rport is not in RPORT_ST_INIT, RPORT_ST_READY, or RPORT_ST_DELETE login is already in progress and there's no need to drop down to FLOGI; doing so will only confuse the other side. Signed-off-by: Hannes Reinecke --- drivers/scsi/libfc/fc_rport.c | 6

[PATCH 0/7] libfc: sanitize kref and state machine fixes

2016-09-30 Thread Hannes Reinecke
Hi all, here is the first round of patch to fixup libfc and FCoE. It consists of a rewrite of the libfc rport kref handling (or, to be precise, is _implements_ rport kref handling) and updates the 'disc_mutex' handling to match the new kref usage. There are also some state machine fixes to handle