Received: by 10.192.165.148 with SMTP id m20csp770077imm; Fri, 27 Apr 2018 07:15:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrG6gGkWY9dLtelHG6lPiufV6sxZoKUm7F3ThtstT12FDyFKfhWkvXNwEOtaOOOUxbLCejs X-Received: by 2002:a65:52cc:: with SMTP id z12-v6mr2288250pgp.126.1524838542688; Fri, 27 Apr 2018 07:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524838542; cv=none; d=google.com; s=arc-20160816; b=qA9a++C3D01qHQDUK/pjqZxZhkVZ4Kzhlj21o5/tdYWFkQS4ps9A6HsEAoUAFxUD1+ rLUrMn/bst+OXgmsyYQEQ5lnJfag2pbEgs0tjgyX0awsOKlzWe2lv/wChh4dtVcAqgKi PFwD2Ysb3Dlu34OsIhz+um6Tnde/BPRHkGHVHbpW1kan4dD3k/mNMZ08j78lRbRXm9id hdNpZGWC44RtB9oslSIeYawjBiPe9JK0kb1LU11fJEGRSKY/o/ebEo95mV6a+2DcUgla edz8lAixxQK4QZJUldpCDurbw0abZmSC7HvAPkRglXRy573lviWs7xA39R+hPihp6Qlv S3zw== 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=8aiCHPc+5IoqmYintlT8wEEIVlhVaCZ/59CX0q3Htp8=; b=za+uMDWsnDa2tJuhtlbsuaia0Uk5mVU6rnjzGsAHpF+H5bVPK38rxDNFXTNVsTrVgX YMTx2UfQAVMEmW8twFKG6SDEukn0pBlRjNDNWhFFypoMLmZV1QP1mks9G16RPpMgRsMA Mb3DKPGo0dm83h+HbC++fEef3152ZkSczjyymjqM6snhmt3i5Zh4iKsvOkn9vr7tkf1O B4bqbDq4Hpm0NbiqoDbfBv0qif7KTne2Uzy5DIGXeAl4Wx/OpEkr+U5tSaFNEpzO88DY 2ns1AkLphHv1CdBIMt7ovzBYxgu77/8x38H3H67Mfkp41m5+5/7SWO+RH7gHMGUojkpy IGSg== 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 t144-v6si1288628pgb.94.2018.04.27.07.15.28; Fri, 27 Apr 2018 07:15:42 -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 S935350AbeD0OOD (ORCPT + 99 others); Fri, 27 Apr 2018 10:14:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:57606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935090AbeD0ONS (ORCPT ); Fri, 27 Apr 2018 10:13:18 -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 CCA23218D4; Fri, 27 Apr 2018 14:13:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCA23218D4 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.16 77/81] s390/dasd: fix IO error for newly defined devices Date: Fri, 27 Apr 2018 15:59:19 +0200 Message-Id: <20180427135747.731238095@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135743.216853156@linuxfoundation.org> References: <20180427135743.216853156@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.16-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)