aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-09-18 16:20:34 -0700
committerSteve French <smfrench@gmail.com>2012-09-24 21:46:30 -0500
commitbf5ea0e2f29b00d4fe5f203d8e59120f797ce451 (patch)
treeaddbc8640de6368c2f13aca0bdafa63a64b0c3b9 /fs/cifs/cifsglob.h
parent6fc05c25ca35e65ee1759dd803f23576a268f5ec (diff)
cifs: change signing routines to deal with smb_rqst structs
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>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 3c007fe641f..5ea50dd316c 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -162,6 +162,20 @@ struct cifs_cred {
*****************************************************************
*/
+/*
+ * A smb_rqst represents a complete request to be issued to a server. It's
+ * formed by a kvec array, followed by an array of pages. Page data is assumed
+ * to start at the beginning of the first page.
+ */
+struct smb_rqst {
+ struct kvec *rq_iov; /* array of kvecs */
+ unsigned int rq_nvec; /* number of kvecs in array */
+ struct page **rq_pages; /* pointer to array of page ptrs */
+ unsigned int rq_npages; /* number pages in array */
+ unsigned int rq_pagesz; /* page size to use */
+ unsigned int rq_tailsz; /* length of last page */
+};
+
enum smb_version {
Smb_1 = 1,
Smb_21,