Received: by 10.192.165.148 with SMTP id m20csp795455imm; Fri, 27 Apr 2018 07:38:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpl5dk6hS3NKwT5rsHTYwYfB+yec7lD/FdVEBpSi7SX9OzygSWU97QV1wUEaF1b3a7FztO/ X-Received: by 2002:a17:902:9886:: with SMTP id s6-v6mr2530106plp.380.1524839933615; Fri, 27 Apr 2018 07:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524839933; cv=none; d=google.com; s=arc-20160816; b=Ti5AO+grgSBYjHwWKtXeRM+1K3CXUdNkpN7FMsGKgdtt8SDpSbBuIwiEjkFkP80Z6s eZaVpfoUdD7suR0J1QbhhC5fO1UImuTdWJ/T2cWIreJ9yiZJjuwRfZ+eBvjuC/3k6qeH Lsc+PzSZ57xIGi4gLTVrSu0rCPlGfcPsJNW7NXdPOcY82kgARggpQ+AsbvbNce8aBvHq lfWzWIhDTlw8zlILDED6/fW5ZOtu0Ld/L82urCEJn6Jdv7b8qmk88NlaaSL79SQtlM/E YUJ5Bk83TmxHnrzWbcCAKqsp7ONmlDu2xOcWTpL/EZ87RwihgXUODtwZH+JkOiPLVZ7V xu6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=0tA0nM7QZkMlvjqC6uhMGnPvlsdm/vsDTsq5/8lxcrI=; b=dM6QGPzCYgGKibyyG13YeOM1xLKanionDc2qlxQIk+iiPbE+gYgCcj+opUjqOkDPY/ dPrMNPmSnO8itBAdMIdVMI9TvIiB9kJdXDx8LzrgP/gEBmjCn6xIyFYFYVhu/IK0Ihps xBp7ZXAW9TRZHO7ijm27LEN/k8BgrdXQNiTq/ff0P/dBpTHnjmV/N7wfm7ln/Y6S4Zwg cmUo1H9bFOktyk0D7P/W28QRYCvxmx2K5k+GCjeyQoAZMy6OzBT+W77xMoCWtJ3YZ/v4 JHp4PqGRe5WNc5hqRr/1dfSxpMMuObLv0551mlBbQojoxLftgS0+2p30AW47hM219OCi dSdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si1329799plu.385.2018.04.27.07.38.39; Fri, 27 Apr 2018 07:38:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934763AbeD0Ohf (ORCPT + 99 others); Fri, 27 Apr 2018 10:37:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:54732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934621AbeD0OJX (ORCPT ); Fri, 27 Apr 2018 10:09:23 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B50121892; Fri, 27 Apr 2018 14:09:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B50121892 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Hoeppner , Stefan Haberland , Martin Schwidefsky Subject: [PATCH 4.14 78/80] s390/dasd: fix IO error for newly defined devices Date: Fri, 27 Apr 2018 15:59:11 +0200 Message-Id: <20180427135736.992339863@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Haberland commit 5d27a2bf6e14f5c7d1033ad1e993fcd0eba43e83 upstream. When a new CKD storage volume is defined at the storage server, Linux may be relying on outdated information about that volume, which leads to the following errors: 1. Command Reject Errors for minidisk on z/VM: dasd-eckd.b3193d: 0.0.XXXX: An error occurred in the DASD device driver, reason=09 dasd(eckd): I/O status report for device 0.0.XXXX: dasd(eckd): in req: 00000000XXXXXXXX CC:00 FC:04 AC:00 SC:17 DS:02 CS:00 RC:0 dasd(eckd): device 0.0.2046: Failing CCW: 00000000XXXXXXXX dasd(eckd): Sense(hex) 0- 7: 80 00 00 00 00 00 00 00 dasd(eckd): Sense(hex) 8-15: 00 00 00 00 00 00 00 00 dasd(eckd): Sense(hex) 16-23: 00 00 00 00 e1 00 0f 00 dasd(eckd): Sense(hex) 24-31: 00 00 40 e2 00 00 00 00 dasd(eckd): 24 Byte: 0 MSG 0, no MSGb to SYSOP 2. Equipment Check errors on LPAR or for dedicated devices on z/VM: dasd(eckd): I/O status report for device 0.0.XXXX: dasd(eckd): in req: 00000000XXXXXXXX CC:00 FC:04 AC:00 SC:17 DS:0E CS:40 fcxs:01 schxs:00 RC:0 dasd(eckd): device 0.0.9713: Failing TCW: 00000000XXXXXXXX dasd(eckd): Sense(hex) 0- 7: 10 00 00 00 13 58 4d 0f dasd(eckd): Sense(hex) 8-15: 67 00 00 00 00 00 00 04 dasd(eckd): Sense(hex) 16-23: e5 18 05 33 97 01 0f 0f dasd(eckd): Sense(hex) 24-31: 00 00 40 e2 00 04 58 0d dasd(eckd): 24 Byte: 0 MSG f, no MSGb to SYSOP Fix this problem by using the up-to-date information provided during online processing via the device specific SNEQ to detect the case of outdated LCU data. If there is a difference, perform a re-read of that data. Cc: stable@vger.kernel.org Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- drivers/s390/block/dasd_alias.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c @@ -592,13 +592,22 @@ static int _schedule_lcu_update(struct a int dasd_alias_add_device(struct dasd_device *device) { struct dasd_eckd_private *private = device->private; - struct alias_lcu *lcu; + __u8 uaddr = private->uid.real_unit_addr; + struct alias_lcu *lcu = private->lcu; unsigned long flags; int rc; - lcu = private->lcu; rc = 0; spin_lock_irqsave(&lcu->lock, flags); + /* + * Check if device and lcu type differ. If so, the uac data may be + * outdated and needs to be updated. + */ + if (private->uid.type != lcu->uac->unit[uaddr].ua_type) { + lcu->flags |= UPDATE_PENDING; + DBF_DEV_EVENT(DBF_WARNING, device, "%s", + "uid type mismatch - trigger rescan"); + } if (!(lcu->flags & UPDATE_PENDING)) { rc = _add_device_to_lcu(lcu, device, device); if (rc)