Skip to content

Commit 7d03ae4

Browse files
committed
smb3: add some missing definitions from MS-FSCC
Add some structures and defines that were recently added to the protocol documentation (see MS-FSCC sections 2.3.29-2.3.34). Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 6a87266 commit 7d03ae4

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

fs/cifs/smb2pdu.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,31 @@ struct copychunk_ioctl_rsp {
999999
__le32 TotalBytesWritten;
10001000
} __packed;
10011001

1002+
/* See MS-FSCC 2.3.29 and 2.3.30 */
1003+
struct get_retrieval_pointer_count_req {
1004+
__le64 StartingVcn; /* virtual cluster number (signed) */
1005+
} __packed;
1006+
1007+
struct get_retrieval_pointer_count_rsp {
1008+
__le32 ExtentCount;
1009+
} __packed;
1010+
1011+
/*
1012+
* See MS-FSCC 2.3.33 and 2.3.34
1013+
* request is the same as get_retrieval_point_count_req struct above
1014+
*/
1015+
struct smb3_extents {
1016+
__le64 NextVcn;
1017+
__le64 Lcn; /* logical cluster number */
1018+
} __packed;
1019+
1020+
struct get_retrieval_pointers_refcount_rsp {
1021+
__le32 ExtentCount;
1022+
__u32 Reserved;
1023+
__le64 StartingVcn;
1024+
struct smb3_extents extents[];
1025+
} __packed;
1026+
10021027
struct fsctl_set_integrity_information_req {
10031028
__le16 ChecksumAlgorithm;
10041029
__le16 Reserved;
@@ -1640,6 +1665,7 @@ struct smb2_file_rename_info { /* encoding of request for level 10 */
16401665
__u64 RootDirectory; /* MBZ for network operations (why says spec?) */
16411666
__le32 FileNameLength;
16421667
char FileName[]; /* New name to be assigned */
1668+
/* padding - overall struct size must be >= 24 so filename + pad >= 6 */
16431669
} __packed; /* level 10 Set */
16441670

16451671
struct smb2_file_link_info { /* encoding of request for level 11 */

fs/cifs/smbfsctl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
#define FSCTL_SET_ZERO_ON_DEALLOC 0x00090194 /* BB add struct */
104104
#define FSCTL_SET_SHORT_NAME_BEHAVIOR 0x000901B4 /* BB add struct */
105105
#define FSCTL_GET_INTEGRITY_INFORMATION 0x0009027C
106+
#define FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT 0x000903d3
107+
#define FSCTL_GET_RETRIEVAL_POINTER_COUNT 0x0009042b
106108
#define FSCTL_QUERY_ALLOCATED_RANGES 0x000940CF
107109
#define FSCTL_SET_DEFECT_MANAGEMENT 0x00098134 /* BB add struct */
108110
#define FSCTL_FILE_LEVEL_TRIM 0x00098208 /* BB add struct */

0 commit comments

Comments
 (0)