All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Hannes Reinecke <hare@suse.de>,
	James Bottomley <jbottomley@parallels.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"jlinton@tributary.com" <jlinton@tributary.com>,
	"kay@vrfy.org" <kay@vrfy.org>,
	"kai.makisara@kolumbus.fi" <kai.makisara@kolumbus.fi>
Subject: Re: [PATCH] st: Do not rewind for SG_IO
Date: Thu, 06 Feb 2014 14:21:17 -0500	[thread overview]
Message-ID: <52F3E0AD.9070301@interlog.com> (raw)
In-Reply-To: <52F3A686.3040107@suse.de>

On 14-02-06 10:13 AM, Hannes Reinecke wrote:
> On 02/06/2014 03:38 PM, James Bottomley wrote:
>> On Thu, 2014-02-06 at 08:50 -0500, Martin K. Petersen wrote:
>>>>>>>> "Hannes" == Hannes Reinecke <hare@suse.de> writes:
>>>
>>>>> My patch provides both the original VPD 0x83 and 0x80 bits as well as
>>>>> a handle identical to /sbin/scsi_id.
>>>>>
>>> Hannes> Bah, don't do that.  That should better be handled by udev
>>> Hannes> rules.  I've got a set of patches moving from scsi_id to sg_inq,
>>> Hannes> which can be easily adapted to using sysfs directly.
>>>
>>> I just want to get out of the "userland sending random SCSI commands"
>>> business. That is a world of pain right now.
>>
>> Well, in the words of Bill Clinton "I feel your pain".  However, I need
>> to know we won't pick up that same whole world of pain in the kernel.
>> Remember it's not just SCSI devices, it's also ATA devices and
>> potentially other block devices ... then there's blkid and all the weird
>> things it does. Then there's transport identifiers for multi-path
>> reservations and so on.
>>
> blkid is actually not so bad, _if_ it would distinguish between
> 'metadata not found' and 'I/O error during metadata read'.
> I made a patch which hopefully should find it's way upstream.
>
> And blkid just issues plain READ commands, so _this_ behaviour won't
> change ...
>
>> Convince me this path won't have us shifting a whole bunch of weird from
>> user space to the kernel without any reduction in the weird factor.
>> Remember the point is not what can we do for all the nicely behaved
>> SCSI-3 devices, it's what do we do for everything.
>>
> Well, first and foremost the patch should be limited to SCSI-3 (and
> later devices). So we'd be insulated from the most obvious crap.
>
> So that leaves only devices which claim to be SCSI-3 or something,
> but still keel over when asked for VPD pages.
> However, this type of devices will fail already, as 'sd.c' is
> already asking for all sorts of VPD pages.
> Which leaves only non-Disk devices, but those tend to have a better
> SCSI implementation as you can't make quick bucks with, say, as SCSI
> Enclosure device.
>
> But the prime motivator behind this patch is that we can be
> reasonably sure the device will answer at all.
> When retrieving the EVPD pages from userspace you always have the
> problem that the device might have gone away or being unresponsive
> by the time you get around sending the SG_IO call.
> So you always have these stuck user-space processes asking for
> information which _had_ been present at one point. In particular
> udev is prone for this; anyone who ever came across the message
>
> udevd[]: worker unexpectedly returned with status 0x0100
>
> knows what I'm talking about ...

Running a small array with an external power supply which
is insufficient for the task of spinning up more than 1 or
2 disks is interesting to watch :-)

Doug Gilbert

> And the more udev events for a device you get, the higher the
> likelyhood for this to happen is.
>
> Plus I could re-use this information for my scsi_dh_alua patchset,
> and for xcopy and friends we'll be needing it, too.
>
> Cheers,
>
> Hannes
>


  reply	other threads:[~2014-02-06 19:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  8:46 [PATCH] st: Do not rewind for SG_IO Hannes Reinecke
2014-01-31 16:36 ` Jeremy Linton
2014-01-31 16:43 ` Jeremy Linton
2014-02-01 14:06   ` Hannes Reinecke
2014-02-01 15:23     ` "Kai Mäkisara (Kolumbus)"
2014-02-02 11:42       ` Hannes Reinecke
2014-02-02 19:15         ` "Kai Mäkisara (Kolumbus)"
2014-02-03  6:55           ` Hannes Reinecke
2014-02-03 14:50         ` Jeremy Linton
2014-02-03 15:06           ` Hannes Reinecke
2014-02-03 15:08             ` Jeremy Linton
2014-02-03 20:51               ` Kay Sievers
2014-02-03 21:11                 ` James Bottomley
2014-02-03 21:58                 ` Jeremy Linton
2014-02-03 22:15                   ` Kay Sievers
2014-02-03 22:26                     ` Jeremy Linton
2014-02-06 13:10                   ` Hannes Reinecke
2014-02-06 13:21                     ` Martin K. Petersen
2014-02-06 13:26                       ` Hannes Reinecke
2014-02-06 13:50                         ` Martin K. Petersen
2014-02-06 14:38                           ` James Bottomley
2014-02-06 15:13                             ` Hannes Reinecke
2014-02-06 19:21                               ` Douglas Gilbert [this message]
2014-02-03 21:16               ` Douglas Gilbert
2014-02-03 21:24                 ` Kay Sievers

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=52F3E0AD.9070301@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=jlinton@tributary.com \
    --cc=kai.makisara@kolumbus.fi \
    --cc=kay@vrfy.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.