On 09/13/05 16:36, Matthew Wilcox wrote: > On Tue, Sep 13, 2005 at 04:23:42PM -0400, Luben Tuikov wrote: > >>A SCSI LUN is not "u64 lun", it has never been and it will >>never be. >> >>A SCSI LUN is "u8 LUN[8]" -- it is this from the Application >>Layer down to the _transport layer_ (if you cared to look at >>_any_ LL transport). > > > Could you explain the difference please? Why is it preferable to keep > the LUN as an array of bytes instead of a single large integer? A LUN is at the same concept level as a CDB. You can see this by reading SAM or looking at the definition of _any_ transport frame of _any_ transport (close your eyes and pick one). What you will see is that there is no "MSB" or "LSB" for things like CDB and LUN fields. SAM is very explicit on this, especially for LUN the language used is very affirmative. >>(It is also capitalized since it is an abbreviation.) > > > Well, we have two conflicting standards to follow here. That of English > which insists that abbreviations be capitalised, and that of the kernel > which requires that all-caps identifiers be macros rather than structure > members. We have to violate one. I've never seen the symbols "lun". In any spec "Logical Unit Number" and "LOGICAL UNIT NUMBER" have always been abbreviated "LUN". As to code, it is completely clear which is which. If you take a look at the SAS code you know immediately what "task->ssp_task.LUN" is. It is what you'd see in a spec, in the transport frame, the "LUN", "u8 LUN[8]" field. After a while, this becomes second nature to you. Luben - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Patrick Mansfield <patmans@us.ibm.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Stefan Richter <stefanr@s5r6.in-berlin.de>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- References:
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: James Bottomley <James.Bottomley@SteelEye.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Luben Tuikov <ltuikov@yahoo.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Christoph Hellwig <hch@infradead.org>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Douglas Gilbert <dougg@torque.net>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: James Bottomley <James.Bottomley@SteelEye.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Patrick Mansfield <patmans@us.ibm.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: James Bottomley <James.Bottomley@SteelEye.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Patrick Mansfield <patmans@us.ibm.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: James Bottomley <James.Bottomley@SteelEye.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Luben Tuikov <luben_tuikov@adaptec.com>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- From: Matthew Wilcox <matthew@wil.cx>
- Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- Prev by Date: [PATCH] Adaptec USBXchange and USB2Xchange support
- Next by Date: Q: why _less_ performance on machine with SMP then with UP kernel ?
- Previous by thread: Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- Next by thread: Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- Index(es):
