]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: move compression definitions into common/fscc.h
authorChenXiaoSong <chenxiaosong@kylinos.cn>
Mon, 8 Jun 2026 14:01:23 +0000 (14:01 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 16 Jun 2026 23:57:21 +0000 (18:57 -0500)
These definitions will also be used by ksmbd, move them into
common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb1pdu.h
fs/smb/client/smb2pdu.h
fs/smb/common/fscc.h
fs/smb/server/smb2pdu.h

index 7584e94d9b2bfaf1b0fd39c532838f00779ce0fa..0870949144abf5fdadb49faea78628c807e9e497 100644 (file)
@@ -1211,11 +1211,6 @@ typedef struct smb_com_transaction_compr_ioctl_req {
        __le16 compression_state;  /* See below for valid flags */
 } __packed TRANSACT_COMPR_IOCTL_REQ;
 
-/* compression state flags */
-#define COMPRESSION_FORMAT_NONE                0x0000
-#define COMPRESSION_FORMAT_DEFAULT     0x0001
-#define COMPRESSION_FORMAT_LZNT1       0x0002
-
 typedef struct smb_com_transaction_ioctl_rsp {
        struct smb_hdr hdr;     /* wct = 19 */
        __u8 Reserved[3];
index 30d70097fe2fad386a356255188e6d235856cadd..b9bf2fa989d5bf24a295b5bab7c26a46425a7119 100644 (file)
@@ -195,10 +195,6 @@ struct network_resiliency_req {
 
 #define NO_FILE_ID 0xFFFFFFFFFFFFFFFFULL /* general ioctls to srv not to file */
 
-struct compress_ioctl {
-       __le16 CompressionState; /* See cifspdu.h for possible flag values */
-} __packed;
-
 /*
  * Maximum number of iovs we need for an ioctl request.
  * [0] : struct smb2_ioctl_req
index bc3012cc295da69badcd9ea8846323b97e808fd7..859849a42fec5e07ca68a4d1cd895ae7eaf68109 100644 (file)
@@ -100,6 +100,24 @@ struct duplicate_extents_to_file_ex {
        __le32 Reserved;
 } __packed;
 
+/*
+ * compression state flags
+ * See MS-FSCC 2.3.18
+ *     MS-FSCC 2.3.67
+ *     MS-FSCC 2.4.9
+ */
+#define COMPRESSION_FORMAT_NONE        0x0000
+#define COMPRESSION_FORMAT_DEFAULT     0x0001
+#define COMPRESSION_FORMAT_LZNT1       0x0002
+
+/*
+ * See MS-FSCC 2.3.18
+ *     MS-FSCC 2.3.67
+ */
+struct compress_ioctl {
+       __le16 CompressionState;
+} __packed;
+
 /* See MS-FSCC 2.3.20 */
 struct fsctl_get_integrity_information_rsp {
        __le16  ChecksumAlgorithm;
index e7cf573e59f00c1fdeb5a81e5761ce31b128f6c4..3bed676bb5ad42ee95580f372e9d4ee81fbff28c 100644 (file)
@@ -230,9 +230,6 @@ struct smb2_file_mode_info {
        __le32 Mode;
 } __packed;
 
-#define COMPRESSION_FORMAT_NONE 0x0000
-#define COMPRESSION_FORMAT_LZNT1 0x0002
-
 struct smb2_file_comp_info {
        __le64 CompressedFileSize;
        __le16 CompressionFormat;