From: Mike Christie <michaelc@cs.wisc.edu>
To: Rob Evers <revers@redhat.com>
Cc: linux-scsi@vger.kernel.org, James.Bottomley@HansenPartnership.com
Subject: Re: [RFC PATCH] SCSI: Correct UA being ignored when notifying of media-changed
Date: Wed, 03 Aug 2011 17:06:05 -0500 [thread overview]
Message-ID: <4E39C64D.6000606@cs.wisc.edu> (raw)
In-Reply-To: <1312378758-17308-1-git-send-email-revers@redhat.com>
On 08/03/2011 08:39 AM, Rob Evers wrote:
> Unit attention commands are getting ignored when a dvd is
> replaced, resulting in errors when accessing the new dvd.
>
> This problem occurred when a system is booted in rescue
> mode via dvd and the dvd is then replaced with another dvd.
> Subsequent commands to a filesystem on the dvd, such as
> 'fsck' and 'restore' report errors.
>
> Solution suggested by Mike Christie.
>
> Signed-off-by: Rob Evers <revers@redhat.com>
> ---
> drivers/scsi/scsi_error.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index a4b9cdb..725cc11 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -294,6 +294,10 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
> */
> if (scmd->device->expecting_cc_ua) {
> scmd->device->expecting_cc_ua = 0;
> + if (sdev->removable) {
> + sdev->changed = 1;
> + return SUCCESS;
> + }
I think this 'if' block got tabbed over once too many times.
> return NEEDS_RETRY;
> }
> /*
next prev parent reply other threads:[~2011-08-03 22:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 13:39 [RFC PATCH] SCSI: Correct UA being ignored when notifying of media-changed Rob Evers
2011-08-03 22:06 ` Mike Christie [this message]
2011-08-03 22:22 ` James Bottomley
2011-08-03 22:31 ` Mike Christie
2011-08-03 22:36 ` James Bottomley
2011-08-03 23:14 ` Mike Christie
2011-08-08 22:50 ` TARUISI Hiroaki
2011-08-09 15:22 ` James Bottomley
2011-08-11 11:25 ` [PATCH] SCSI: Prevent from retrying with expecting_cc_ua in case of disk change TARUISI Hiroaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E39C64D.6000606@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=revers@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).