All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: KY Srinivasan <kys@microsoft.com>
Cc: James Bottomley <James.Bottomley@Hansenpartnership.com>,
	Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	James Bottomley <jejb@linux.vnet.ibm.com>,
	Jens Axboe <axboe@kernel.dk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Dexuan Cui <decui@microsoft.com>, Long Li <longli@microsoft.com>,
	Josh Poulson <jopoulso@microsoft.com>,
	"Adrian Suhov (Cloudbase Solutions SRL)" <v-adsuho@microsoft.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [RFC] hv_storvsc: error handling.
Date: Mon, 6 Mar 2017 09:57:05 -0800	[thread overview]
Message-ID: <20170306095705.76931fc9@xeon-e3> (raw)
In-Reply-To: <DM5PR03MB2490F80E2F703D6FD3F1AC4BA02C0@DM5PR03MB2490.namprd03.prod.outlook.com>


> > I will try it, but it can't work for two reasons.
> > First, the INVALID_LUN error is masked off on INQUIRY in current code.
> > Second, the scsi_device is instantiated already as part of scan probe process
> > before it gets here.  
> 
> Was the invalid LUN in the LUN0 position. Inquiry of LUN0 support (when LUN0 is not populated)
> was added only recently to address host side issue.

When probing the code probes with LUN 1, ...

There is a cause where kernel does INQUIRY on LUN0, it looks kernel is asking for
page code 80 which is optional "Unit Serial Number".  And then WS2016 is returning
an error and invalid sense data.  The old masking of errors caused kernel to
interpret sense data as Unit Serial Number which is also not good but looks harmless.

 
> > The best solution so far is:
> > 	- remove old INQUIRY/SENSE error masking
> > 	+ add new workaround for INQUIRY of device id on LUN 0
> > 	  which appears to be the reason for old masking
> > 	+ return errors on missing LUN
> > 	+ provide better transport services for hot remove (rather
> >           than detecting by failed I/O).  
> 
> This the mechanism used by the host for notifying LUN removal - invalid LUN error code.

This has a couple of problems. First, it means that hotplug doesn't occur until
an I/O is done. Second the current code was not being truthful to block layer.
If it has to handle hotplug in this manner, it should have still failed the I/O.
If application was using direct I/O it would want to know that write failed.

Perhaps the existing channel mechanism can be used as notification path.

  reply	other threads:[~2017-03-06 17:57 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 23:30 SCSI regression in 4.11 Stephen Hemminger
2017-02-28  1:19 ` Stephen Hemminger
2017-02-28  2:16   ` Jens Axboe
2017-02-28 14:08   ` Christoph Hellwig
2017-02-28 15:32     ` Jens Axboe
2017-02-28 17:06       ` James Bottomley
2017-02-28 17:16         ` Stephen Hemminger
2017-02-28 17:31           ` Jens Axboe
2017-02-28 18:41         ` Stephen Hemminger
2017-02-28 19:10           ` James Bottomley
2017-02-28 18:57         ` Stephen Hemminger
2017-02-28 23:48           ` James Bottomley
2017-03-01  1:25             ` Stephen Hemminger
2017-03-01  6:20               ` James Bottomley
2017-03-01  6:48                 ` Stephen Hemminger
2017-03-01 15:50                   ` Christoph Hellwig
2017-03-01 15:54                     ` Stephen Hemminger
2017-03-02  0:01                       ` Christoph Hellwig
2017-03-02  0:56                         ` Christoph Hellwig
2017-03-02  1:40                           ` Stephen Hemminger
2017-03-02 13:25                             ` Hannes Reinecke
2017-03-02 17:48                               ` Stephen Hemminger
2017-03-02 18:23                               ` Stephen Hemminger
2017-03-02 18:36                                 ` James Bottomley
2017-03-02 19:05                                   ` Stephen Hemminger
2017-03-02 19:18                                     ` James Bottomley
2017-03-03 22:29                                       ` Stephen Hemminger
2017-03-04  0:50                                       ` [RFC] hv_storvsc: error handling Stephen Hemminger
2017-03-04 11:55                                         ` Hannes Reinecke
2017-03-04 21:03                                         ` KY Srinivasan
2017-03-04 21:36                                           ` James Bottomley
2017-03-04 21:39                                             ` KY Srinivasan
2017-03-04 23:55                                               ` KY Srinivasan
2017-03-06 16:36                                           ` Stephen Hemminger
2017-03-06 17:48                                             ` KY Srinivasan
2017-03-06 17:57                                               ` Stephen Hemminger [this message]
2017-03-07  5:06                                               ` Christoph Hellwig
2017-03-07  6:08                                                 ` KY Srinivasan
2017-03-02  0:57                         ` SCSI regression in 4.11 Stephen Hemminger
2017-03-01 16:13                     ` Stephen Hemminger
2017-03-01 18:48                 ` Stephen Hemminger
2017-03-01 18:57                   ` James Bottomley
2017-03-01 19:20                     ` James Bottomley
2017-03-01 19:39                       ` Stephen Hemminger
2017-03-01 21:27                       ` Stephen Hemminger
2017-03-01 23:09                         ` James Bottomley
2017-03-01 23:39                           ` Stephen Hemminger
2017-03-01 19:00                   ` Linus Torvalds
2017-02-28 17:33     ` Stephen Hemminger

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=20170306095705.76931fc9@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=James.Bottomley@Hansenpartnership.com \
    --cc=axboe@kernel.dk \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jopoulso@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=martin.petersen@oracle.com \
    --cc=torvalds@linux-foundation.org \
    --cc=v-adsuho@microsoft.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 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.