aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-09-09CIFS: Add create lease v2 context for SMB3Pavel Shilovsky1-0/+19
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2013-09-09CIFS: Store lease state itself rather than a mapped oplock valuePavel Shilovsky1-0/+4
and separate smb20_operations struct. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2013-09-08CIFS: Implement follow_link for SMB2Pavel Shilovsky1-0/+14
that allows to access files through symlink created on a server. Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2013-07-10CIFS: Reconnect durable handles for SMB2Pavel Shilovsky1-1/+7
On reconnects, we need to reopen file and then obtain all byte-range locks held by the client. SMB2 protocol provides feature to make this process atomic by reconnecting to the same file handle with all it's byte-range locks. This patch adds this capability for SMB2 shares. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
2013-07-10CIFS: Request durable open for SMB2 opensPavel Shilovsky1-0/+6
by passing durable context together with a handle caching lease or batch oplock. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
2013-07-10CIFS: Simplify SMB2_open code pathPavel Shilovsky1-1/+1
by passing a filename to a separate iovec regardless of its length. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
2013-06-26SMB2 FSCTL and IOCTL worker functionSteve French1-0/+23
This worker function is needed to send SMB2 fsctl (and ioctl) requests including: validating negotiation info (secure negotiate) querying the servers network interfaces copy offload (refcopy) Followon patches for the above three will use this. This patch also does general validation of the response. In the future, as David Disseldorp notes, for the copychunk ioctl case, we will want to enhance the response processing to allow returning the chunk request limits to the caller (even though the server returns an error, in that case we would return data that the caller could use - see 2.2.32.1). See MS-SMB2 Section 2.2.31 for more details on format of fsctl. Acked-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2013-06-26Some missing share flagsSteve French1-2/+5
Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
2013-06-24Update headers to update various SMB3 ioctl definitionsSteve French1-1/+47
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>
2013-06-24Add some missing SMB3 and SMB3.02 flagsSteve French1-5/+18
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>
2013-06-24Add SMB3.02 dialect supportSteve French1-0/+1
The new Windows update supports SMB3.02 dialect, a minor update to SMB3. This patch adds support for mounting with vers=3.02 Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
2012-10-01[CIFS] Fix SMB2 negotiation support to select only one dialect (based on vers=)Steve French1-1/+11
Based on whether the user (on mount command) chooses: vers=3.0 (for smb3.0 support) vers=2.1 (for smb2.1 support) or (with subsequent patch, which will allow SMB2 support) vers=2.0 (for original smb2.02 dialect support) send only one dialect at a time during negotiate (we had been sending a list). Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2.1 lease break supportPavel Shilovsky1-0/+25
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2012-09-24CIFS: Request SMB2.1 leasesPavel Shilovsky1-2/+41
if server supports them and we need oplocks. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2012-09-24CIFS: Add brlock support for SMB2Pavel Shilovsky1-0/+24
Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru>
2012-09-24CIFS: Handle SMB2 lock flagsPavel Shilovsky1-0/+5
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
2012-09-24CIFS: Add statfs support for SMB2Pavel Shilovsky1-0/+19
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add oplock break support for SMB2Pavel Shilovsky1-0/+10
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add readdir support for SMB2Pavel Shilovsky1-0/+28
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2 support for set_file_sizePavel Shilovsky1-0/+4
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2 support for hardlink operationPavel Shilovsky1-0/+9
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2 support for rename operationPavel Shilovsky1-0/+28
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2 support for cifs_iovec_writePavel Shilovsky1-0/+30
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2012-09-24CIFS: Add SMB2 support for cifs_iovec_readPavel Shilovsky1-0/+28
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add SMB2 support for flushPavel Shilovsky1-0/+15
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-24CIFS: Add open/close file support for SMB2Pavel Shilovsky1-0/+4
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-09-06CIFS: Fix endianness conversionPavel Shilovsky1-2/+2
Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-08-19CIFS: Fix log messages in packet checking for SMB2Pavel Shilovsky1-4/+6
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Make CAP_* checks protocol independentPavel Shilovsky1-0/+3
Since both CIFS and SMB2 use ses->capabilities (server->capabilities) field but flags are different we should make such checks protocol independent. Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Add echo request support for SMB2Pavel Shilovsky1-0/+12
Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Query SMB2 inode infoPavel Shilovsky1-0/+111
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Add SMB2 support for is_path_accessiblePavel Shilovsky1-0/+167
that needs for a successful mount through SMB2 protocol. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Add tree connect/disconnect capability for SMB2Pavel Shilovsky1-0/+57
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Add session setup/logoff capability for SMB2Pavel Shilovsky1-0/+37
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Add capability to send SMB2 negotiate messagePavel Shilovsky1-0/+39
and add negotiate request type to let set_credits know that we are only on negotiate stage and no need to make a decision about disabling echos and oplocks. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Make demultiplex_thread work with SMB2 codePavel Shilovsky1-0/+36
Now we can process SMB2 messages: check message, get message id and wakeup awaiting routines. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Make transport routines work with SMB2Pavel Shilovsky1-0/+59
Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
2012-07-24CIFS: Map SMB2 status codes to POSIX errorsSteve French1-0/+56
Add mapping table for 32 bit SMB2 status codes to linux errors. Note that SMB2 does not use DOS/OS2 errors (ever) so mapping to DOS/OS2 errors as a common network subset (as we do for cifs) doesn't help. And note that the set of status codes is much more complete here. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>