aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2013-06-13 11:51:10 -0400
committerSteve French <smfrench@gmail.com>2013-06-24 02:56:45 -0400
commit2b5dc286da3917435106da6431e8d06209b01953 (patch)
tree51ba90c2398152b327122ff7fd2141d8be0ae6be /fs/cifs
parent20b6d8b42e7e7c9af5046fe525d6709e10d14992 (diff)
Add some missing SMB3 and SMB3.02 flags
A few missing flags from SMB3.0 dialect, one missing from 2.1, and the new #define flags for SMB3.02 Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 3da33da8123c..e27ad39f2bde 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -287,7 +287,11 @@ struct smb2_tree_connect_rsp {
287#define SHI1005_FLAGS_ENABLE_HASH 0x00002000 287#define SHI1005_FLAGS_ENABLE_HASH 0x00002000
288 288
289/* Possible share capabilities */ 289/* Possible share capabilities */
290#define SMB2_SHARE_CAP_DFS cpu_to_le32(0x00000008) 290#define SMB2_SHARE_CAP_DFS cpu_to_le32(0x00000008) /* all dialects */
291#define SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY cpu_to_le32(0x00000010) /* 3.0 */
292#define SMB2_SHARE_CAP_SCALEOUT cpu_to_le32(0x00000020) /* 3.0 */
293#define SMB2_SHARE_CAP_CLUSTER cpu_to_le32(0x00000040) /* 3.0 */
294#define SMB2_SHARE_CAP_ASYMMETRIC cpu_to_le32(0x00000080) /* 3.02 */
291 295
292struct smb2_tree_disconnect_req { 296struct smb2_tree_disconnect_req {
293 struct smb2_hdr hdr; 297 struct smb2_hdr hdr;
@@ -518,17 +522,25 @@ struct smb2_flush_rsp {
518 __le16 Reserved; 522 __le16 Reserved;
519} __packed; 523} __packed;
520 524
525/* For read request Flags field below, following flag is defined for SMB3.02 */
526#define SMB2_READFLAG_READ_UNBUFFERED 0x01
527
528/* Channel field for read and write: exactly one of following flags can be set*/
529#define SMB2_CHANNEL_NONE 0x00000000
530#define SMB2_CHANNEL_RDMA_V1 0x00000001 /* SMB3 or later */
531#define SMB2_CHANNEL_RDMA_V1_INVALIDATE 0x00000001 /* SMB3.02 or later */
532
521struct smb2_read_req { 533struct smb2_read_req {
522 struct smb2_hdr hdr; 534 struct smb2_hdr hdr;
523 __le16 StructureSize; /* Must be 49 */ 535 __le16 StructureSize; /* Must be 49 */
524 __u8 Padding; /* offset from start of SMB2 header to place read */ 536 __u8 Padding; /* offset from start of SMB2 header to place read */
525 __u8 Reserved; 537 __u8 Flags; /* MBZ unless SMB3.02 or later */
526 __le32 Length; 538 __le32 Length;
527 __le64 Offset; 539 __le64 Offset;
528 __u64 PersistentFileId; /* opaque endianness */ 540 __u64 PersistentFileId; /* opaque endianness */
529 __u64 VolatileFileId; /* opaque endianness */ 541 __u64 VolatileFileId; /* opaque endianness */
530 __le32 MinimumCount; 542 __le32 MinimumCount;
531 __le32 Channel; /* Reserved MBZ */ 543 __le32 Channel; /* MBZ except for SMB3 or later */
532 __le32 RemainingBytes; 544 __le32 RemainingBytes;
533 __le16 ReadChannelInfoOffset; /* Reserved MBZ */ 545 __le16 ReadChannelInfoOffset; /* Reserved MBZ */
534 __le16 ReadChannelInfoLength; /* Reserved MBZ */ 546 __le16 ReadChannelInfoLength; /* Reserved MBZ */
@@ -546,8 +558,9 @@ struct smb2_read_rsp {
546 __u8 Buffer[1]; 558 __u8 Buffer[1];
547} __packed; 559} __packed;
548 560
549/* For write request Flags field below the following flag is defined: */ 561/* For write request Flags field below the following flags are defined: */
550#define SMB2_WRITEFLAG_WRITE_THROUGH 0x00000001 562#define SMB2_WRITEFLAG_WRITE_THROUGH 0x00000001 /* SMB2.1 or later */
563#define SMB2_WRITEFLAG_WRITE_UNBUFFERED 0x00000002 /* SMB3.02 or later */
551 564
552struct smb2_write_req { 565struct smb2_write_req {
553 struct smb2_hdr hdr; 566 struct smb2_hdr hdr;