All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: Hannes Reinecke <hare@suse.de>,
	linux-scsi@vger.kernel.org,
	James Bottomley <jbottomley@parallels.com>,
	Jeremy Linton <jlinton@tributary.com>,
	Robert Elliott <Elliott@hp.com>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH 2/4] scsi: use 64-bit LUNs
Date: Mon, 25 Feb 2013 12:08:49 -0500	[thread overview]
Message-ID: <512B9AA1.40109@interlog.com> (raw)
In-Reply-To: <512B8454.4050806@linux.vnet.ibm.com>

On 13-02-25 10:33 AM, Steffen Maier wrote:
> Hi Hannes,
>
> I like the idea and most of the patch set, so I only have a few questions left and some review comments below.
>
> Just curious: Do you also plan to adapt systemd/udev, especially path_id for fc transport with its open coded copy of int_to_scsilun()?
>
> Since I don't see zfcp touched in this patch set, assuming this set will get merged, I plan to adapt a few spots in zfcp that might not work with 64 bit luns out of the box although most of it already works with 64 bit luns inside.
>
> Speaking of opaque handling of scsi luns: Lately I noticed that some sg3_utils tools decode the lun format and only report parts of the entire 64 bit fcp lun, e.g. sg_scan or "sg_luns -d". I don't have enough historical scsi experience to know why that is, maybe because of some SPI background. By itself this is not a problem, however, rescan-scsi-bus.sh makes use of those scsi lun parts and then fails when matching those with the full scsi lun exposed by the midlayer to user space. E.g. with flat space addresses of IBM DS8000 this does not seem to work:
>
> # sg_luns -v -s2 -d /dev/sg2 | head
>      report luns cdb: a0 00 02 00 00 00 00 00 20 00 00 00
>      report luns: requested 8192 bytes but got 4112 bytes
> Lun list length = 4104 which imples 513 lun entries
> Report luns [select_report=2]:
>      c101000000000000
>        REPORT LUNS well known logical unit
>      4020400000000000
>        Flat space addressing: lun=32
>      4020400100000000
>        Flat space addressing: lun=32
>      4020400200000000
>        Flat space addressing: lun=32
>                                   ^^<=== 0x20 of the lun's 1st short

According to sam5r13.pdf ** section 4.7.7.3 you owe me
a beer :-) "Flat space" addressing is only 16 bits long.
"Extended Flat space" and "Long Extended Flat space"
addressing would have the top bit set in byte 0 (and no
part of the actual lun is in byte 0).

# sg_luns --test=4020400200000000 -H
Decoded LUN:
   Flat space addressing: lun=0x0020

A vendor specific LUN or am I misreading SAM-5?

sg_luns --test=d220400200000000 -H
Decoded LUN:
   Extended flat space addressing: lun=0x204002

<snip>

> I guess we cannot adapt sg_ioctl SG_GET_SCSI_ID that easily without breaking the user space interface. But how does a user of this interface know that there are 64 bit luns in the kernel but the ioctl cannot handle the new kernel functionality (and may be affected by aliasing)?

I think that would involve adding a new ioctl (e.g. SG_GET_SCSI_ID64)
and last time I proposed that L. Torvalds said something like: over
his dead body.

Doug Gilbert

** now we have conglomerate LUNs!


  parent reply	other threads:[~2013-02-25 17:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19  8:17 [PATCH 0/4] scsi: 64-bit LUN support Hannes Reinecke
2013-02-19  8:18 ` [PATCH 1/4] scsi_scan: Fixup scsilun_to_int() Hannes Reinecke
2013-02-19  8:18 ` [PATCH 2/4] scsi: use 64-bit LUNs Hannes Reinecke
2013-02-25 15:33   ` Steffen Maier
2013-02-25 15:52     ` Hannes Reinecke
2013-02-25 17:08     ` Douglas Gilbert [this message]
2013-02-19  8:18 ` [PATCH 3/4] scsi: use 64-bit value for 'max_luns' Hannes Reinecke
2013-02-19 16:30   ` Michael Christie
2013-02-19 16:33     ` James Bottomley
2013-02-20  6:43       ` Hannes Reinecke
2013-02-19  8:18 ` [PATCH 4/4] scsi: Remove CONFIG_SCSI_MULTI_LUN Hannes Reinecke
2013-02-21 16:15 ` [PATCH 0/4] scsi: 64-bit LUN support Elliott, Robert (Server Storage)
2013-02-21 16:32   ` James Bottomley
2013-02-25 16:02     ` Douglas Gilbert
2013-02-23  9:31   ` Hannes Reinecke
2013-03-26 18:00 ` Chad Dupuis
2013-03-26 19:03   ` Douglas Gilbert
2013-03-27  7:37   ` Hannes Reinecke
2013-03-27 11:58     ` Chad Dupuis
2013-03-29 16:32     ` Tomas Henzl
2013-03-30 16:53       ` Hannes Reinecke
2013-03-31 17:44         ` Tomas Henzl
2013-04-04 10:17           ` Hannes Reinecke
2013-04-05 15:24             ` James Smart
2013-04-08 14:06               ` Hannes Reinecke
2013-04-08 15:37               ` Tomas Henzl
2013-04-09  7:38                 ` Hannes Reinecke
2013-04-09 14:27                   ` Elliott, Robert (Server Storage)
2013-04-09 14:52                     ` Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2013-02-20 13:47 [PATCH v2 " Hannes Reinecke
2013-02-20 13:47 ` [PATCH 2/4] scsi: use 64-bit LUNs Hannes Reinecke

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=512B9AA1.40109@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=Elliott@hp.com \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=jlinton@tributary.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maier@linux.vnet.ibm.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.