summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* CIFS: Request SMB2.1 leasesPavel Shilovsky2012-09-248-27/+256
| | | | | | | 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: Check for mandatory brlocks on read/writePavel Shilovsky2012-09-242-23/+102
| | | | | | | | | Currently CIFS code accept read/write ops on mandatory locked area when two processes use the same file descriptor - it's wrong. Fix this by serializing io and brlock operations on the inode. Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFS: Turn lock mutex into rw semaphorePavel Shilovsky2012-09-244-38/+41
| | | | | | | | and allow several processes to walk through the lock list and read can_cache_brlcks value if they are not going to modify them. Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
* CIFS: Use brlock cache for SMB2Pavel Shilovsky2012-09-243-1/+94
| | | | | 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-247-5/+210
| | | | Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru>
* CIFS: Handle SMB2 lock flagsPavel Shilovsky2012-09-242-0/+17
| | | | Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
* CIFS: Move brlock code to ops structPavel Shilovsky2012-09-244-25/+40
| | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
* CIFS: Remove spinlock dependence in brlock processingPavel Shilovsky2012-09-243-39/+53
| | | | | | | | Now we need to lock/unlock a spinlock while processing brlock ops on the inode. Move brlocks of a fid to a separate list and attach all such lists to the inode. This let us not hold a spinlock. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
* CIFS: Add NTLMSSP sec type to defaultsPavel Shilovsky2012-09-241-1/+1
| | | | | | to let us negotiate SMB2 without specifying sec type explicitly. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
* cifs: remove kmap lock and rsize limitJeff Layton2012-09-244-49/+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: replace kvec array in readdata with a single kvecJeff Layton2012-09-244-32/+21
| | | | | | | The array is no longer needed. We just need a single kvec to hold the header for signature checking. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: convert async read code to use pages array without kmappingJeff Layton2012-09-244-81/+80
| | | | | | | | Replace the "marshal_iov" function with a "read_into_pages" function. That function will copy the read data off the socket and into the pages array, kmapping and reading pages one at a time. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: turn the pages list in cifs_readdata into an arrayJeff Layton2012-09-242-38/+52
| | | | | | | We'll need an array to put into a smb_rqst, so convert this into an array instead of (ab)using the lru list_head. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: allocate kvec array for cifs_readdata as a separate allocationJeff Layton2012-09-242-4/+13
| | | | | | | | | Eventually, we're going to want to append a list of pages to cifs_readdata instead of a list of kvecs. To prepare for that, turn the kvec array allocation into a separate one and just keep a pointer to it in the readdata. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: add deprecation warning to sockopt=TCP_NODELAY optionJeff Layton2012-09-241-5/+6
| | | | | | | | Now that we're using TCP_CORK on the socket, there's no value in continuting to support this option. Schedule it for removal in 3.9. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com>
* cifs: remove the kmap size limit from wsizeJeff Layton2012-09-242-6/+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: convert async write code to pass in data via rq_pages arrayJeff Layton2012-09-244-95/+33
| | | | | | Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: change cifs_call_async to use smb_rqst structsJeff Layton2012-09-247-79/+85
| | | | | | | | | | | For now, none of the callers populate rq_pages. That will be done for writes in a later patch. While we're at it, change the prototype of setup_async_request not to need a return pointer argument. Just return the pointer to the mid_q_entry or an ERR_PTR. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: teach signing routines how to deal with arrays of pages in a smb_rqstJeff Layton2012-09-244-1/+25
| | | | | | | | | Use the smb_send_rqst helper function to kmap each page in the array and update the hash for that chunk. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: teach smb_send_rqst how to handle arrays of pagesJeff Layton2012-09-241-2/+54
| | | | | | | | | | | | Add code that allows smb_send_rqst to send an array of pages after the initial kvec array has been sent. For now, we simply kmap the page array and send it using the standard smb_send_kvec function. Eventually, we may want to convert this code to use kernel_sendpage under the hood and avoid the kmap altogether for the page data. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: cork the socket before a send and uncork it afterwardJeff Layton2012-09-242-0/+16
| | | | | | | | | | | | | | | We want to send SMBs as "atomically" as possible. Prior to sending any data on the socket, cork it to make sure that no non-full frames go out. Afterward, uncork it to make sure all of the data gets pushed out to the wire. Note that this more or less renders the socket=TCP_NODELAY mount option obsolete. When TCP_CORK and TCP_NODELAY are used on the same socket, TCP_NODELAY is essentially ignored. Acked-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: convert send code to use smb_rqst structsJeff Layton2012-09-241-45/+90
| | | | | | | | | | | | | | Again, just a change in the arguments and some function renaming here. In later patches, we'll change this code to deal with page arrays. In this patch, we add a new smb_send_rqst wrapper and have smb_sendv call that. Then we move most of the existing smb_sendv code into a new function -- smb_send_kvec. This seems a little redundant, but later we'll flesh this out to deal with arrays of pages. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: change smb2 signing routines to use smb_rqst structsJeff Layton2012-09-243-26/+27
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
* cifs: change signing routines to deal with smb_rqst structsJeff Layton2012-09-245-14/+44
| | | | | | | | | | | | | | | | We need a way to represent a call to be sent on the wire that does not require having all of the page data kmapped. Behold the smb_rqst struct. This new struct represents an array of kvecs immediately followed by an array of pages. Convert the signing routines to use these structs under the hood and turn the existing functions for this into wrappers around that. For now, we're just changing these functions to take different args. Later, we'll teach them how to deal with arrays of pages. 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-245-0/+127
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move statfs to ops structPavel Shilovsky2012-09-243-25/+43
| | | | | 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-245-2/+141
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move oplock break to ops structPavel Shilovsky2012-09-243-4/+17
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Process oplocks for SMB2Pavel Shilovsky2012-09-247-12/+68
| | | | | Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add readdir support for SMB2Pavel Shilovsky2012-09-245-2/+264
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move readdir code to ops structPavel Shilovsky2012-09-246-103/+173
| | | | | 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-244-0/+39
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move set_file_info to ops structPavel Shilovsky2012-09-243-73/+88
| | | | | 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-246-3/+60
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move set_file_size to ops structPavel Shilovsky2012-09-245-75/+89
| | | | | 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-246-6/+76
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move hardlink to ops structSteve French2012-09-245-44/+63
| | | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for rename operationPavel Shilovsky2012-09-245-0/+167
| | | | | Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move rename to ops structPavel Shilovsky2012-09-245-57/+66
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Enable signing in SMB2Pavel Shilovsky2012-09-249-28/+253
| | | | | | | | | | | | | | Use hmac-sha256 and rather than hmac-md5 that is used for CIFS/SMB. Signature field in SMB2 header is 16 bytes instead of 8 bytes. Automatically enable signing by client when requested by the server when signing ability is available to the client. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add writepage support for SMB2Pavel Shilovsky2012-09-243-0/+75
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move writepage to ops structPavel Shilovsky2012-09-245-22/+38
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add readpage support for SMB2Pavel Shilovsky2012-09-243-0/+65
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move readpage code to ops structPavel Shilovsky2012-09-243-11/+32
| | | | | 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-248-44/+206
| | | | | | 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: Move async write to ops structPavel Shilovsky2012-09-244-3/+18
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Add SMB2 support for cifs_iovec_readPavel Shilovsky2012-09-2410-20/+225
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
* CIFS: Move async read to ops structPavel Shilovsky2012-09-244-2/+13
| | | | | 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: Move r/wsize negotiating to ops structPavel Shilovsky2012-09-243-142/+149
| | | | | Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
OpenPOWER on IntegriCloud