Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754967AbdGJWrw (ORCPT ); Mon, 10 Jul 2017 18:47:52 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50749 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754935AbdGJWrs (ORCPT ); Mon, 10 Jul 2017 18:47:48 -0400 From: Mauricio Faria de Oliveira To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: hare@suse.de, bart.vanassche@sandisk.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] scsi_dh_alua: fix stuck I/O after unavailable/standby states Date: Mon, 10 Jul 2017 19:47:33 -0300 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-MML: disable x-cbid: 17071022-0024-0000-0000-00000189DEE1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071022-0025-0000-0000-0000165208D1 Message-Id: <1499726857-7875-1-git-send-email-mauricfo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-10_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707100389 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 32 Currently, scsi_dh_alua fails I/O requests early on once ALUA state unavailable/standby occur, which prevents path checkers to actually check if I/O still fails or now works. Then I/O requests are blocked indefinitely due to queue_if_no_path but the underlying individual paths are fully operational, and can be verified as such otherways (e.g., SG_IO). This patchset addresses that problem, and adds a few improvements to the logging of PG state changes. Patch 1 fixes the problem. Patch 2 makes sure that state changes for all PGs are logged. Patch 3 makes sure that state no-changes for PGs in unavailable/standby are not logged - only changes are. Patch 4 adds few sdev_dbg() calls to track the path to alua_rtpg_work() Tested on v4.12+ (commit b4b8cbf679c4). Mauricio Faria de Oliveira (4): scsi: scsi_dh_alua: allow I/O in target port unavailable and standby states scsi: scsi_dh_alua: print changes to RTPG state of all PGs scsi: scsi_dh_alua: do not print RTPG state if it remains unavailable/standby scsi: scsi_dh_alua: add sdev_dbg() to track alua_rtpg_work() drivers/scsi/device_handler/scsi_dh_alua.c | 129 +++++++++++++++++++++++++---- 1 file changed, 113 insertions(+), 16 deletions(-) -- 1.8.3.1