Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp850222pxb; Mon, 16 Aug 2021 20:16:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjua2K1/5sXQIZwVDYqfvYt+tH322FIWaQLo3yBb/snQBhrpXjE5YnjL9XrvKXhBfwW/+l X-Received: by 2002:a05:6402:d49:: with SMTP id ec9mr1524261edb.333.1629170187999; Mon, 16 Aug 2021 20:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629170187; cv=none; d=google.com; s=arc-20160816; b=hoM0e0AASk665j9TQZffdizTgw/AgwcHRaN/O2kpegGYr0tf5efFSz9UEh55RFXMUv jXTFjxQchQc9FMwnpma4AjGNsPcyWEdpNH9LP2jqnjd5Vk8OQVxfWT5l5NjuxlwhTfDP 6Xg0e0aAWXZPgLwxt6oB8pkFSw26HpzPHdmzerbNDSoIW5BFtDwlu5NQGGZBCjDBWOQt tjxFgFJuDM9h+EJR/u2L68F19YIXjAad8/LkbDRsZGkSX8wHb0wdZLrIC5+3fuHBwHpy q3QKrEcZex7NffwRplpQurSHc/VhLD++AMSlqOx5XtqpA6D11USXMEuXuMMd0zsSxDjx aMpQ== 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 :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=JoQLvjsYItLOiE1HWjDofqYeImyE73Bei9ARdw5/4dI=; b=K7R0JYZmdaRJD09tPqPNDjpoiZwNYgfI6/FH7ctR45F5xuLMHgIiWM54QNIOe8pfvQ Qpymd6Gd7/4AU1aDs2KYzii6we3KUWYxdzeU5loN2yuTmZZPyWG099yDGN8DGauwFJ/g 1pE8ZA9cCDuaeSU5AnusEKIVOzXZOhFpcptyPsiX6azD9txfLHgjaj8KQ5UzGzw0eZHK Jc0TlY95nmVPugMAKt4ZHElGUyRPFdq57107imqHupLS3pLK2OCi7MdaxqV6LWJJK+/l v8j1TqPEROBjFjmUpuDb044CizktQ2LdCz2YKrxsSowjS1+3cYpbUsdEBEFMQjNLdz18 +2Zg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si900130edw.397.2021.08.16.20.16.04; Mon, 16 Aug 2021 20:16:27 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236836AbhHQDOp (ORCPT + 99 others); Mon, 16 Aug 2021 23:14:45 -0400 Received: from mail-pj1-f51.google.com ([209.85.216.51]:44829 "EHLO mail-pj1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233585AbhHQDOo (ORCPT ); Mon, 16 Aug 2021 23:14:44 -0400 Received: by mail-pj1-f51.google.com with SMTP id hv22-20020a17090ae416b0290178c579e424so3852637pjb.3; Mon, 16 Aug 2021 20:14:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JoQLvjsYItLOiE1HWjDofqYeImyE73Bei9ARdw5/4dI=; b=Wh8bycid4ZzYIK9WSG45WkviD/iEEiFG53Z/dUaXdT5yHU5Jt69vzI7HcwkBiKiBV3 6UVXgmkp6Fzefmn4SKKQLJxdMkrdqjYKigoAaV4Z0HTDHP3Yal0qklFFmiNOt9aXRqRp QOl7R6D+4zcqgKjDW7Fc34RCPe2sQ6WsT96BD8oMIDjAHYOZs4yo6uGk0HKvG99sAlVt nE8T9IwN99IRNFi2XiiRmMw5S4AdxX5vKtm3H+UKv/ymludVlCO7LVckngqdomw9JreF uWSRVahQVaJHOU8S0lKXwDvOOZLeEfnp6n7AXtuInBqU4SsBnuWqYQn+ox7rl77mHseh 1QcQ== X-Gm-Message-State: AOAM530laFmJS3ObuGYXtte956zJBYhHcpmbBK3aqQ0dH0sWnG+VKFNY JQO/TWXJHF7Jc9kJpC7xLno= X-Received: by 2002:a17:90b:f8d:: with SMTP id ft13mr1266374pjb.228.1629170052197; Mon, 16 Aug 2021 20:14:12 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:11e7:e120:dc0c:66b5? ([2601:647:4000:d7:11e7:e120:dc0c:66b5]) by smtp.gmail.com with ESMTPSA id ob6sm441515pjb.4.2021.08.16.20.14.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Aug 2021 20:14:11 -0700 (PDT) Subject: Re: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly To: =?UTF-8?Q?Christian_L=c3=b6hle?= , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" References: From: Bart Van Assche Message-ID: Date: Mon, 16 Aug 2021 20:14:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/16/21 2:37 AM, Christian Löhle wrote: > 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); > Reviewed-by: Bart Van Assche