diff options
author | Steve French <smfrench@gmail.com> | 2013-06-19 18:41:10 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-06-24 02:56:47 -0400 |
commit | be7457d388d25e5d2ebba4c7f216b47b5e3d1eef (patch) | |
tree | 2fe545ec48c6d35c4c7cdb76e2f391ac78a0c272 /fs/cifs/smb2pdu.h | |
parent | f43a033d44c3f2f6b153c9c63fff0132f4314f24 (diff) |
Update headers to update various SMB3 ioctl definitions
MS-SMB2 Section 2.2.31 lists fsctls. Update our list of valid
cifs/smb2/smb3 fsctls and some related structs
based on more recent version of docs. Additional detail on
less common ones can be found in MS-FSCC section 2.3.
CopyChunk (server side copy, ie refcopy) will depend on a few
of these
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r-- | fs/cifs/smb2pdu.h | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index e27ad39f2bde..d351377d2513 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/smb2pdu.h | 2 | * fs/cifs/smb2pdu.h |
3 | * | 3 | * |
4 | * Copyright (c) International Business Machines Corp., 2009, 2010 | 4 | * Copyright (c) International Business Machines Corp., 2009, 2013 |
5 | * Etersoft, 2012 | 5 | * Etersoft, 2012 |
6 | * Author(s): Steve French (sfrench@us.ibm.com) | 6 | * Author(s): Steve French (sfrench@us.ibm.com) |
7 | * Pavel Shilovsky (pshilovsky@samba.org) 2012 | 7 | * Pavel Shilovsky (pshilovsky@samba.org) 2012 |
@@ -482,6 +482,52 @@ struct create_lease { | |||
482 | struct lease_context lcontext; | 482 | struct lease_context lcontext; |
483 | } __packed; | 483 | } __packed; |
484 | 484 | ||
485 | /* this goes in the ioctl buffer when doing a copychunk request */ | ||
486 | struct copychunk_ioctl { | ||
487 | char SourceKey[24]; | ||
488 | __le32 ChunkCount; /* we are only sending 1 */ | ||
489 | __le32 Reserved; | ||
490 | /* array will only be one chunk long for us */ | ||
491 | __le64 SourceOffset; | ||
492 | __le64 TargetOffset; | ||
493 | __u32 Length; /* how many bytes to copy */ | ||
494 | __u32 Reserved2; | ||
495 | } __packed; | ||
496 | |||
497 | struct smb2_ioctl_req { | ||
498 | struct smb2_hdr hdr; | ||
499 | __le16 StructureSize; /* Must be 57 */ | ||
500 | __u16 Reserved; | ||
501 | __le32 CtlCode; | ||
502 | __u64 PersistentFileId; /* opaque endianness */ | ||
503 | __u64 VolatileFileId; /* opaque endianness */ | ||
504 | __le32 InputOffset; | ||
505 | __le32 InputCount; | ||
506 | __le32 MaxInputResponse; | ||
507 | __le32 OutputOffset; | ||
508 | __le32 OutputCount; | ||
509 | __le32 MaxOutputResponse; | ||
510 | __le32 Flags; | ||
511 | __u32 Reserved2; | ||
512 | char Buffer[0]; | ||
513 | } __packed; | ||
514 | |||
515 | struct smb2_ioctl_rsp { | ||
516 | struct smb2_hdr hdr; | ||
517 | __le16 StructureSize; /* Must be 57 */ | ||
518 | __u16 Reserved; | ||
519 | __le32 CtlCode; | ||
520 | __u64 PersistentFileId; /* opaque endianness */ | ||
521 | __u64 VolatileFileId; /* opaque endianness */ | ||
522 | __le32 InputOffset; | ||
523 | __le32 InputCount; | ||
524 | __le32 OutputOffset; | ||
525 | __le32 OutputCount; | ||
526 | __le32 Flags; | ||
527 | __u32 Reserved2; | ||
528 | /* char * buffer[] */ | ||
529 | } __packed; | ||
530 | |||
485 | /* Currently defined values for close flags */ | 531 | /* Currently defined values for close flags */ |
486 | #define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB cpu_to_le16(0x0001) | 532 | #define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB cpu_to_le16(0x0001) |
487 | struct smb2_close_req { | 533 | struct smb2_close_req { |