On 4/8/22 21:42, Douglas Gilbert wrote:
On 2022-04-08 10:55, Bart Van Assche wrote:
On 4/7/22 20:56, Douglas Gilbert wrote:
+/* This value is used to size a C array, see below if cdb length >
32 */
+#define SCSI_MAX_COMPILE_TIME_CDB_LEN 32
Since CDBs longer than 16 bytes are rare, how about using 16 as the
maximum compile-time CDB size?
Well that was the way it was before the surgery performed by Christoph.
If reducing the size of the scsi_cmnd structure by another 16 bytes
is that important, it can be easily done. My "long cdb" side of the
union takes 16 bytes currently (12 on a 32 bit machine).
Some environments (e.g. Android TV booting from UFS) are
memory-constrained. Hence the request to keep struct scsi_cmnd as small
as possible (without sacrificing performance for high-end setups).
IMO there should be comments added to scsi_cmnd.h to stress an object
of that type is always preceded (in memory) by a struct request object.
They are created as a pair, and are destroyed (freed, destructed) as
a pair.
Although adding such a comment seems fine to me: isn't this something
that applies to all blk-mq drivers?
Thanks,
Bart.