Re: [PATCH 27/32] scsi_data_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 18, 2007 at 08:59:58AM +0200, Benny Halevy wrote:
> yeah. The sglist pointer shuffle makes sense and so are the field type
> changes and coalescing, but the union holding the deprecated fields
> of scsi_data_buff is going away.

Indeed.  We could always do ...

	union {
		struct scsi_data_pointer;
		struct {
			char _padding_[sizeof(struct scsi_data_pointer)];
			int result;
		}
	}

But that might set a new record of depths of obfuscation.

> #pragma pack(4) before struct scsi_cmnd
> (followed by #pragma pack()) should do the trick 
> by saving member padding bytes. As a general rule I don't like pragma's
> but this one works, is easy to understand, and is pretty standard.

But it might well have the effect of pessimising accesses to the struct,
and accesses to scsi_cmnd are pretty hot.  I've seen gcc revert to byte
loads and stores to packed structs in the past.  Maybe it's got better
now.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux