Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp169779pxb; Mon, 16 Aug 2021 02:44:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwecfvy2pDLmZBsJImluvVtRsqoVw2GrZgg9LtQLXNT6TJ55/R7HVkMHcZUttyXjmY0TJA7 X-Received: by 2002:a5d:9bcf:: with SMTP id d15mr12073967ion.88.1629107096373; Mon, 16 Aug 2021 02:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629107096; cv=none; d=google.com; s=arc-20160816; b=T1aE/kcVqAzW+uQtbIgUwEXXZdSoJyTZSHLQpKmHp3wycF7HBJpUzeDaLSs8TMEpRW ur/MX4Ykk+nZ7Hzrg7Z1rMsvYSsur+dfh9tWMjJJxOY/ZRAbqEMVxe+KY/kPT11/i1Ws 1UOqVp5aVSEHEeRFGWBdEeplhHpA7ahvrQHFZewW+sCe3I93SV2G7ZT1DOgCsbA4Y0rh +ANqp6AzW1Mwr9KPK7LiW6NPwP2mjpqs5T/iGGw3yM+F8RspYfAZBHH7luvMGc/10Hkz uLLONm3aU0jBFHKB+xcggygE43dR+mCpWYMhOP/kbHhSrBHiDNgMDxAfZH2eSotVENHV bTiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:message-id:date:thread-index :thread-topic:subject:to:from; bh=OYlhjCNoiK9TSVuHfdImx2dCoi8RL7F06gW5GgCFDwc=; b=b27dvoiJ+qyrd/EL0jYg2egx5DoQI4o52GWWyvCn1bll4NR0rz+V6/Mqs8+pMELTzc GYMsZaubQK+WHZl9Eq4vwalYONxTGSFyBYZaB1SKxEf0onYunjrH/Wqmax4h8XQjMYZ3 wePzH4h/X0RxqB147Yd7c5yGHVT8gIIR7R86P7n2FVpdyw8/QzBX36/4IpJICb1d46Kh SV7lUyHIHry2NjKpNisoYGdHoammMR4qs+/ik1Guaxc/EYcKOZibv63az2oBFNTdErPv /roN5/rDrfvAnkzs5X3gu1TxGs1pBUkcgrfbG4O9KZJdycD8sNXYZ3xYFT2sJ66xGnOu LdHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hyperstone.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 14si10530240ilt.110.2021.08.16.02.44.44; Mon, 16 Aug 2021 02:44:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hyperstone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235365AbhHPJog convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 Aug 2021 05:44:36 -0400 Received: from de-smtp-delivery-105.mimecast.com ([194.104.109.105]:51016 "EHLO de-smtp-delivery-105.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbhHPJof (ORCPT ); Mon, 16 Aug 2021 05:44:35 -0400 Received: from GBR01-LO2-obe.outbound.protection.outlook.com (mail-lo2gbr01lp2052.outbound.protection.outlook.com [104.47.21.52]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-7-tAVT4TBrNxyCYsKs2sMypQ-1; Mon, 16 Aug 2021 11:37:52 +0200 X-MC-Unique: tAVT4TBrNxyCYsKs2sMypQ-1 Received: from CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:89::10) by CWXP265MB3221.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:b9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.13; Mon, 16 Aug 2021 09:37:51 +0000 Received: from CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM ([fe80::4971:9c81:8b96:f29f]) by CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM ([fe80::4971:9c81:8b96:f29f%2]) with mapi id 15.20.4415.023; Mon, 16 Aug 2021 09:37:51 +0000 From: =?iso-8859-1?Q?Christian_L=F6hle?= To: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" Subject: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Thread-Topic: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Thread-Index: AQHXkoIH1dJPthk+/U+6Ae1Ef5Tiig== Date: Mon, 16 Aug 2021 09:37:51 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0a9829e2-baf4-4d03-804a-08d96099845a x-ms-traffictypediagnostic: CWXP265MB3221: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0 x-microsoft-antispam-message-info: 7JCC3AQahDKlsndyInvgUzhCHTWz65lg8zLa7eFv+yt/6LIPZmVuPt96x7uRkOTpSdhAm+nXJB/gZgAZTLGjtzdZVWvVB1T59Rg/xkqjpH/wuOu1UONYOuH4DRQm7fOCKpC2mYbdRxrlvqjDQAzUZtrmj3fVnr2Gefhal/A+p8v0al8xtRGK2DSjWYLKOVEtC1sUdJjsQ2TXdZwMZKUcISSMWsCcXc5XeF69NjNGldS18NAT3fvNsWGS9Zw5GUhdkZFgL8qQnEzPeerTkTaYknuD8Jo6TwIdMG4+fq7QJnyn3ixtj8XZTWDp1bJq8/g2XyICsQrns4u8RYNzCpW6eczn/TIntA7TBNMAWvgSccqW81pqMY76JrlhHB8t4UmBd8HI87AXFWOIEMBegw1oAcYfcIFYtyRDP88eoUbhp5mG5ulEHuQ1CrZpdA9T7tio6ctUNSCikBm+1EJ3wO11o9nz40ga37s3RYUiT7j+3dgIxVUXfrmJDpqe+Xc2xaNZQQpmq2tTUElzfKbcRQOronYJ9hqvsGUvj/wOzlkA8oZTljJehmvfMjIUfNgCqC+sDBJ2vA6VKtxFXr47zdY29CuKHAiQK/7uAG5ciE7dluOFdOVtpgAqUn2BxldYwsFjCnxXrTEgOdaWcFOZjkL0BU0ZNnH9oCcaDAIceKqYojoNh36HdfT3DI5N0n3xAr/Nbyz+wivws4szEBY2k17C7A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(396003)(346002)(366004)(376002)(39830400003)(136003)(122000001)(71200400001)(64756008)(316002)(8936002)(66446008)(86362001)(2906002)(26005)(38100700002)(76116006)(91956017)(66476007)(66946007)(66556008)(5660300002)(55016002)(478600001)(4744005)(38070700005)(9686003)(110136005)(186003)(33656002)(8676002)(7696005)(6506007)(83380400001)(52536014);DIR:OUT;SFP:1101 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?AqV3c9kjYQScEG09e+qNYzRSyrCDgG/K1mDHHdiMkoNolcIzraFbYY3tZ6?= =?iso-8859-1?Q?frSnLus7O3s0QCWQSeSY0zxYlZyDvZH4YenOaXRkTJnQOxE8RbjhBd9wW4?= =?iso-8859-1?Q?dhYFbOxHFWQ3g536ijnZs8lva7FwxT4mOeq7mq7U80ykXfvJSS1H2VIvwJ?= =?iso-8859-1?Q?c94EMV3SHW15FnuTQN/5fqmmILuO8DRBQjGUqqZAUaO48LbjuLclW8yZ7/?= =?iso-8859-1?Q?2vth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riEnnuNNAHJ6iPWvXLM6GI?= =?iso-8859-1?Q?rfwyEDLpbvecytL8R+PHB/QJ5mdcghOv55wm0L0iYR3m0sRqWvqsEeIYH6?= =?iso-8859-1?Q?ZR//wvB8FAApOwixuzApmU7gMZL8xIdMrWhIZPpbqS/g95YpL7G3X5msB+?= =?iso-8859-1?Q?K+LB4XFRHlZQQ0bdBdlUif28vJGxqkBKCAKg9zWOIUYy6n1dONINuZ3aW9?= =?iso-8859-1?Q?1/ejlsKoFRi+XSf0/pa7pqSdtm1YhVeZO8vLLA5cBpm7QO8=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: hyperstone.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 0a9829e2-baf4-4d03-804a-08d96099845a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2021 09:37:51.5794 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 86f203eb-e878-4188-b297-34c118c18b11 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: m3iQ9Ie17MPngmfjeDHj9Et0irWp0j6VakUQaWFXXH97txYLh5KoYkXtUB5fs+8z8EJjTSVU6rIl2Pvnl6q1xA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWXP265MB3221 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: hyperstone.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sd_spinup_disk function logs what is happening nicely. Unfortunately this output stops if the media was marked removed in the meantime. To prevent a puzzling output, add a print for this case, too. Signed-off-by: Christian Loehle --- drivers/scsi/sd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b8d55af763f9..7e556f5b57e0 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2180,8 +2180,10 @@ sd_spinup_disk(struct scsi_disk *sdkp) * doesn't have any media in it, don't bother * with any more polling. */ - if (media_not_present(sdkp, &sshdr)) + if (media_not_present(sdkp, &sshdr)) { + sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n"); return; + } if (the_result) sense_valid = scsi_sense_valid(&sshdr); -- 2.32.0 Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz Managing Directors: Dr. Jan Peter Berns. Commercial register of local courts: Freiburg HRB381782