dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* Make LUNs higher than 255 more friendly to look at
@ 2020-09-24 21:10 Brian Bunker
  2020-09-25 14:14 ` Steffen Maier
  2020-09-26  4:23 ` Bart Van Assche
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Bunker @ 2020-09-24 21:10 UTC (permalink / raw)
  To: device-mapper development

For LUNs between 0 and 255 peripheral addressing is used. For LUNs higher than 255 the LUN addressing
should switch to flat according to the specification. Instead of printing out the LUN number without regard to
the shifting of address method, display the LUN as it was intended to be the user connecting the LUN. The
current display leaves a non-obvious 16384 offset.

In short, a LUN connected as 258 will show up in multipath output as 16642. Instead display it as the
expected 258. This is for display only and doesn’t change the actual contents of the LUN variable.

Signed-off-by: Brian Bunker <brian@purestorage.com>
___
--- a/libmultipath/print.c      2020-09-24 13:52:18.661828011 -0600
+++ b/libmultipath/print.c      2020-09-24 14:28:27.603542303 -0600
@@ -394,7 +394,7 @@
                        pp->sg_id.host_no,
                        pp->sg_id.channel,
                        pp->sg_id.scsi_id,
-                       pp->sg_id.lun);
+                       (pp->sg_id.lun & 0x4000) ? pp->sg_id.lun - 0x4000 : pp->sg_id.lun);
 }

 static int

Brian Bunker
SW Eng
brian@purestorage.com




--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-26  4:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 21:10 Make LUNs higher than 255 more friendly to look at Brian Bunker
2020-09-25 14:14 ` Steffen Maier
2020-09-25 16:10   ` Brian Bunker
2020-09-26  4:23 ` Bart Van Assche

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).