* [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly
@ 2021-08-16 9:37 Christian Löhle
2021-08-17 3:14 ` Bart Van Assche
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Löhle @ 2021-08-16 9:37 UTC (permalink / raw)
To: linux-scsi, linux-kernel, jejb, martin.petersen
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 <cloehle@hyperstone.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly
2021-08-16 9:37 [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Christian Löhle
@ 2021-08-17 3:14 ` Bart Van Assche
2021-08-18 2:37 ` Martin K. Petersen
2021-08-24 4:02 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2021-08-17 3:14 UTC (permalink / raw)
To: Christian Löhle, linux-scsi, linux-kernel, jejb, martin.petersen
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 <cloehle@hyperstone.com>
> ---
> 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 <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly
2021-08-16 9:37 [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Christian Löhle
2021-08-17 3:14 ` Bart Van Assche
@ 2021-08-18 2:37 ` Martin K. Petersen
2021-08-24 4:02 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-08-18 2:37 UTC (permalink / raw)
To: Christian Löhle; +Cc: linux-scsi, linux-kernel, jejb, martin.petersen
Christian,
> 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.
Applied to 5.15/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly
2021-08-16 9:37 [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Christian Löhle
2021-08-17 3:14 ` Bart Van Assche
2021-08-18 2:37 ` Martin K. Petersen
@ 2021-08-24 4:02 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-08-24 4:02 UTC (permalink / raw)
To: jejb, Christian Löhle, linux-scsi, linux-kernel; +Cc: Martin K . Petersen
On Mon, 16 Aug 2021 09:37:51 +0000, 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.
>
>
>
> [...]
Applied to 5.15/scsi-queue, thanks!
[1/1] scsi: sd: Do not exit sd_spinup_disk quietly
https://git.kernel.org/mkp/scsi/c/848ade90ba9c
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-24 4:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 9:37 [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly Christian Löhle
2021-08-17 3:14 ` Bart Van Assche
2021-08-18 2:37 ` Martin K. Petersen
2021-08-24 4:02 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.