OpenCloudOS-Kernel/drivers/s390/scsi
Steffen Maier 9edf7d75ee [SCSI] zfcp: status read buffers on first adapter open with link down
Commit 64deb6efdc
"[SCSI] zfcp: Use status_read_buf_num provided by FCP channel"
started using a value returned by the channel but only evaluated the value
if the fabric link is up.
Commit 8d88cf3f3b
"[SCSI] zfcp: Update status read mempool"
introduced mempool resizings based on the above value.
On setting an FCP device online for the very first time since boot, a new
zeroed adapter object is allocated. If the link is down, the number of
status read requests remains zero. Since just the config data exchange is
incomplete, we proceed with adapter open recovery. However, we
unconditionally call mempool_resize with adapter->stat_read_buf_num == 0 in
this case.

This causes a kernel message "kernel BUG at mm/mempool.c:131!" in process
"zfcperp<FCP-device-bus-ID>" with last function mempool_resize in Krnl PSW
and zfcp_erp_thread in the Call Trace.

Don't evaluate channel values which are invalid on link down. The number of
status read requests is always valid, evaluated, and set to a positive
minimum greater than zero. The adapter open recovery can proceed and the
channel has status read buffers to inform us on a future link up event.
While we are not aware of any other code path that could result in mempool
resize attempts of size zero, we still also initialize the number of status
read buffers to be posted to a static minimum number on adapter object
allocation.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.35+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-31 16:32:38 -07:00
..
Makefile [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_aux.c [SCSI] zfcp: status read buffers on first adapter open with link down 2013-05-31 16:32:38 -07:00
zfcp_ccw.c [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_dbf.c [SCSI] zfcp: module parameter dbflevel for early debugging 2013-05-31 16:32:38 -07:00
zfcp_dbf.h [SCSI] zfcp: Do not wakeup while suspended 2012-09-24 12:11:01 +04:00
zfcp_def.h [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_erp.c [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_ext.h [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_fc.c [SCSI] zfcp: cleanup port sysfs attribute usage 2013-05-31 16:32:36 -07:00
zfcp_fc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_fsf.c [SCSI] zfcp: status read buffers on first adapter open with link down 2013-05-31 16:32:38 -07:00
zfcp_fsf.h [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_qdio.c s390/time: rename tod clock access functions 2013-02-14 15:55:10 +01:00
zfcp_qdio.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_reqlist.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
zfcp_scsi.c [SCSI] zfcp: block queue limits with data router 2013-05-31 16:32:37 -07:00
zfcp_sysfs.c [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_unit.c [SCSI] zfcp: cleanup unit sysfs attribute usage 2013-05-31 16:32:37 -07:00