All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: Hannes Reinecke <hare@suse.de>
Cc: James Bottomley <jbottomley@parallels.com>,
	linux-scsi@vger.kernel.org, Dave Chinner <david@fromorbit.com>,
	Ren Mingxin <renmx@cn.fujitsu.com>, Theodore Tso <tytso@mit.edu>,
	linux-fsdevel@vger.kernel.org,
	device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 4/4] scsi: Return ENODATA on medium error
Date: Tue, 02 Jul 2013 12:14:41 +0900	[thread overview]
Message-ID: <51D245A1.6000106@ce.jp.nec.com> (raw)
In-Reply-To: <1372684586-41829-5-git-send-email-hare@suse.de>

Hi Hannes,

On 07/01/13 22:16, Hannes Reinecke wrote:
> When a medium error is detected the SCSI stack should return
> ENODATA to the upper layers.
> 
> Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  block/blk-core.c          |  3 +++
>  drivers/md/dm-mpath.c     | 16 +++++++++++++++-
>  drivers/scsi/scsi_error.c |  2 +-
>  drivers/scsi/scsi_lib.c   |  5 +++++
>  include/scsi/scsi.h       |  1 +
>  5 files changed, 25 insertions(+), 2 deletions(-)
..
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index bdf26f5..57896cea 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c

Thank you for including the change.
But I think this change to dm should be a separate patch in this series
(prerequisite to the SCSI error code change) and Cc to dm-devel.

> @@ -1261,6 +1261,20 @@ static void activate_path(struct work_struct *work)
>  				pg_init_done, pgpath);
>  }
>  
> +static int noretry_error(int error)
> +{
> +	switch(error) {
> +	case -EOPNOTSUPP:
> +	case -EREMOTEIO:
> +	case -EILSEQ:
> +	case -ENODATA:

   	case -ENOSPC:

We don't want to fail the path for -ENOSPC, do we?

> +		return 1;
> +	}
> +
> +	/* Anything else could be a path failure, so should be retried */
> +	return 0;
> +}
> +
>  /*
>   * end_io handling
>   */
> @@ -1284,7 +1298,7 @@ static int do_end_io(struct multipath *m, struct request *clone,
>  	if (!error && !clone->errors)
>  		return 0;	/* I/O complete */
>  
> -	if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ)
> +	if (noretry_error(error))
>  		return error;
>  
>  	if (mpio->pgpath)

-- 
Jun'ichi Nomura, NEC Corporation

      reply	other threads:[~2013-07-02  3:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 13:16 [PATCHv3 0/4] scsi: More detailed I/O errors Hannes Reinecke
2013-07-01 13:16 ` [PATCH 1/4] scsi: Document enhanced error codes Hannes Reinecke
2013-07-01 13:16 ` [PATCH 2/4] scsi: Set hostbyte status in scsi_check_sense() Hannes Reinecke
2013-07-01 13:16 ` [PATCH 3/4] scsi: return ENOSPC on thin provisioning failure Hannes Reinecke
2013-07-01 13:16 ` [PATCH 4/4] scsi: Return ENODATA on medium error Hannes Reinecke
2013-07-02  3:14   ` Jun'ichi Nomura [this message]

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=51D245A1.6000106@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=david@fromorbit.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=renmx@cn.fujitsu.com \
    --cc=tytso@mit.edu \
    /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 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.