summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
Commit message (Collapse)AuthorAgeFilesLines
* CIFS: Respect epoch value from create lease context v2Pavel Shilovsky2013-09-091-9/+48
| | | | | | | that force a client to purge cache pages when a server requests it. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add create lease v2 context for SMB3Pavel Shilovsky2013-09-091-13/+54
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move parsing lease buffer to ops structPavel Shilovsky2013-09-091-0/+13
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move creating lease buffer to ops structPavel Shilovsky2013-09-091-0/+41
| | | | | | | to make adding new types of lease buffers easier. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Store lease state itself rather than a mapped oplock valuePavel Shilovsky2013-09-091-6/+140
| | | | | | | and separate smb20_operations struct. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Replace clientCanCache* bools with an integerPavel Shilovsky2013-09-081-2/+2
| | | | | | | that prepare the code to handle different types of SMB2 leases. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Implement follow_link for SMB2Pavel Shilovsky2013-09-081-3/+57
| | | | | | | | 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>
* CIFS: Reconnect durable handles for SMB2Pavel Shilovsky2013-07-101-0/+3
| | | | | | | | | | | 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)>
* CIFS: Make SMB2_open use cifs_open_parms structPavel Shilovsky2013-07-101-18/+33
| | | | | | | to prepare it for further durable handle reconnect processing. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
* CIFS: Respect create_options in smb2_open_filePavel Shilovsky2013-07-101-3/+3
| | | | | | | and eliminated unused file_attribute parms of SMB2_open. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
* cifs: fix SMB2 signing enablement in cifs_enable_signingJeff Layton2013-06-271-0/+8
| | | | | | | | | | | | | | | | Commit 9ddec56131 (cifs: move handling of signed connections into separate function) broke signing on SMB2/3 connections. While the code to enable signing on the connections was very similar between the two, the bits that get set in the sec_mode are different. Declare a couple of new smb_version_values fields and set them appropriately for SMB1 and SMB2/3. Then change cifs_enable_signing to use those instead. Reported-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Tested-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* [CIFS] Fix build warningSteve French2013-06-271-0/+1
| | | | | | | | | | | | | | Fix build warning in Shirish's recent SMB3 signing patch which occurs when SMB2 support is disabled in Kconfig. fs/built-in.o: In function `cifs_setup_session': >> (.text+0xa1767): undefined reference to `generate_smb3signingkey' Pointed out by: automated 0-DAY kernel build testing backend Intel Open Source Technology Center CC: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* Remove typoSteve French2013-06-261-1/+0
| | | | | | | Cut and paste likely introduced accidentally inserted spurious #define in d60622eb5a23904facf4a4efac60f5bfa810d7d4 causes no harm but looks weird Signed-off-by: Steve French <smfrench@gmail.com>
* Add ability to dipslay SMB3 share flags and capabilities for debuggingSteve French2013-06-241-0/+20
| | | | | | | | | | SMB3 protocol adds various optional per-share capabilities (and SMB3.02 adds one more beyond that). Add ability to dump (/proc/fs/cifs/DebugData) the share capabilities and share flags to improve debugging. Signed-off-by: Steve French <smfrench@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com>
* Add SMB3.02 dialect supportSteve French2013-06-241-0/+18
| | | | | | | | 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>
* [CIFS] cifs: Rename cERROR and cFYI to cifs_dbgJoe Perches2013-05-041-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not obvious from reading the macro names that these macros are for debugging. Convert the names to a single more typical kernel style cifs_dbg macro. cERROR(1, ...) -> cifs_dbg(VFS, ...) cFYI(1, ...) -> cifs_dbg(FYI, ...) cFYI(DBG2, ...) -> cifs_dbg(NOISY, ...) Move the terminating format newline from the macro to the call site. Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the "CIFS VFS: " prefix for VFS messages. Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y) $ size fs/cifs/cifs.ko* text data bss dec hex filename 265245 2525 132 267902 4167e fs/cifs/cifs.ko.new 268359 2525 132 271016 422a8 fs/cifs/cifs.ko.old Other miscellaneous changes around these conversions: o Miscellaneous typo fixes o Add terminating \n's to almost all formats and remove them from the macros to be more kernel style like. A few formats previously had defective \n's o Remove unnecessary OOM messages as kmalloc() calls dump_stack o Coalesce formats to make grep easier, added missing spaces when coalescing formats o Use %s, __func__ instead of embedded function name o Removed unnecessary "cifs: " prefixes o Convert kzalloc with multiply to kcalloc o Remove unused cifswarn macro Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Fix missing of oplock_read value in smb30_values structurePavel Shilovsky2013-03-061-0/+1
| | | | | | Cc: stable@vger.kernel.org Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFS: Don't let read only caching for mandatory byte-range locked filesPavel Shilovsky2013-01-011-0/+2
| | | | | | | | | | | If we have mandatory byte-range locks on a file we can't cache reads because pagereading may have conflicts with these locks on the server. That's why we should allow level2 oplocks for files without mandatory locks only. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* Do not send SMB2 signatures for SMB3 framesSteve French2012-12-091-0/+68
| | | | | | | | | | | Restructure code to make SMB2 vs. SMB3 signing a protocol specific op. SMB3 signing (AES_CMAC) is not enabled yet, but this restructuring at least makes sure we don't send an smb2 signature on an smb3 signed connection. A followon patch will add AES_CMAC and enable smb3 signing. Signed-off-by: Steve French <smfrench@gmail.com> Acked-by: Jeff Layton <jlayton@samba.org>
* Add SMB2.02 dialect supportSteve French2012-12-051-0/+17
| | | | | | | | This patch enables optional for original SMB2 (SMB2.02) dialect by specifying vers=2.0 on mount. Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Make use of common cifs_build_path_to_root for CIFS and SMB2Steve French2012-12-051-18/+0
| | | | | | | | | because the is no difference here. This also adds support of prefixpath mount option for SMB2. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* [CIFS] Fix SMB2 negotiation support to select only one dialect (based on vers=)Steve French2012-10-011-0/+19
| | | | | | | | | | | | | | | 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>
* CIFS: Make ops->close return voidPavel Shilovsky2012-09-261-2/+2
| | | | | Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
* Trivial endian fixesSteve French2012-09-241-1/+1
| | | | | | | | Some trivial endian fixes for the SMB2 code. One warning remains which I asked Pavel to look at. Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2.1 lease break supportPavel Shilovsky2012-09-241-0/+4
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFS: Request SMB2.1 leasesPavel Shilovsky2012-09-241-0/+21
| | | | | | | 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>
* CIFS: Use brlock cache for SMB2Pavel Shilovsky2012-09-241-1/+2
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFS: Add brlock support for SMB2Pavel Shilovsky2012-09-241-0/+13
| | | | Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru>
* CIFS: Handle SMB2 lock flagsPavel Shilovsky2012-09-241-0/+12
| | | | Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
* cifs: remove kmap lock and rsize limitJeff Layton2012-09-241-3/+0
| | | | | | | Now that we aren't abusing the kmap address space, there's no need for this lock or to impose a limit on the rsize. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: remove the kmap size limit from wsizeJeff Layton2012-09-241-3/+0
| | | | | | | | | Now that we're not kmapping so much at once, there's no need to cap the wsize at the amount that can be simultaneously kmapped. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add statfs support for SMB2Pavel Shilovsky2012-09-241-0/+22
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add oplock break support for SMB2Pavel Shilovsky2012-09-241-0/+22
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Process oplocks for SMB2Pavel Shilovsky2012-09-241-4/+30
| | | | | Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add readdir support for SMB2Pavel Shilovsky2012-09-241-0/+57
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add set_file_info support for SMB2Pavel Shilovsky2012-09-241-0/+1
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for set_file_sizePavel Shilovsky2012-09-241-0/+11
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for hardlink operationPavel Shilovsky2012-09-241-0/+1
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for rename operationPavel Shilovsky2012-09-241-0/+1
| | | | | Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add writepage support for SMB2Pavel Shilovsky2012-09-241-0/+12
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add readpage support for SMB2Pavel Shilovsky2012-09-241-0/+12
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for cifs_iovec_writePavel Shilovsky2012-09-241-0/+1
| | | | | | 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>
* CIFS: Add SMB2 support for cifs_iovec_readPavel Shilovsky2012-09-241-0/+19
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 r/wsize negotiatingPavel Shilovsky2012-09-241-0/+45
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for flushPavel Shilovsky2012-09-241-0/+8
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for query_file_infoPavel Shilovsky2012-09-241-0/+21
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add open/close file support for SMB2Pavel Shilovsky2012-09-241-1/+21
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for unlinkPavel Shilovsky2012-09-241-0/+1
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for rmdirPavel Shilovsky2012-07-271-0/+1
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for mkdir operationPavel Shilovsky2012-07-271-0/+2
| | | | | Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
OpenPOWER on IntegriCloud