Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SMB3: update structures for new compression protocol definitions

Protocol has been extended for additional compression headers.
See MS-SMB2 section 2.2.42

Signed-off-by: Steve French <stfrench@microsoft.com>

+9 -2
+9 -2
fs/cifs/smb2pdu.h
··· 144 144 } __packed; 145 145 146 146 /* See MS-SMB2 2.2.42 */ 147 - struct smb2_compression_transform_hdr { 147 + struct smb2_compression_transform_hdr_unchained { 148 148 __le32 ProtocolId; /* 0xFC 'S' 'M' 'B' */ 149 149 __le32 OriginalCompressedSegmentSize; 150 150 __le16 CompressionAlgorithm; ··· 160 160 __le16 CompressionAlgorithm; 161 161 __le16 Flags; 162 162 __le32 Length; /* length of compressed playload including field below if present */ 163 - /* __le32 OriginalPayloadSize; */ /* optional */ 163 + /* __le32 OriginalPayloadSize; */ /* optional, present when LZNT1, LZ77, LZ77+Huffman */ 164 164 } __packed; 165 165 166 166 /* See MS-SMB2 2.2.42.2 */ 167 + struct smb2_compression_transform_hdr_chained { 168 + __le32 ProtocolId; /* 0xFC 'S' 'M' 'B' */ 169 + __le32 OriginalCompressedSegmentSize; 170 + /* struct compression_payload_header[] */ 171 + } __packed; 172 + 173 + /* See MS-SMB2 2.2.42.2.2 */ 167 174 struct compression_pattern_payload_v1 { 168 175 __le16 Pattern; 169 176 __le16 Reserved1;