aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-10-19 15:29:49 -0400
committerJeff Layton <jlayton@redhat.com>2011-10-19 15:29:49 -0400
commit44d22d846fdc7c3e688fc1ff5ae6d06d08bb5656 (patch)
treea7c55381c4eee74c2be9a4dc0728f0a927367d04 /fs/cifs/transport.c
parente9097ab48978c89b9c0926e2ae5d49bf6ea91b18 (diff)
cifs: add a callback function to receive the rest of the frame
In order to handle larger SMBs for readpages and other calls, we want to be able to read into a preallocated set of buffers. Rather than changing all of the existing code to preallocate buffers however, we instead add a receive callback function to the MID. cifsd will call this function once the mid_q_entry has been identified in order to receive the rest of the SMB. If the mid can't be identified or the receive pointer is unset, then the standard 3rd phase receive function will be called. Reviewed-and-Tested-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 33a3fbf3a3a5..e7398d0cd054 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -339,8 +339,8 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
339 */ 339 */
340int 340int
341cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, 341cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
342 unsigned int nvec, mid_callback_t *callback, void *cbdata, 342 unsigned int nvec, mid_receive_t *receive,
343 bool ignore_pend) 343 mid_callback_t *callback, void *cbdata, bool ignore_pend)
344{ 344{
345 int rc; 345 int rc;
346 struct mid_q_entry *mid; 346 struct mid_q_entry *mid;
@@ -374,6 +374,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
374 goto out_err; 374 goto out_err;
375 } 375 }
376 376
377 mid->receive = receive;
377 mid->callback = callback; 378 mid->callback = callback;
378 mid->callback_data = cbdata; 379 mid->callback_data = cbdata;
379 mid->midState = MID_REQUEST_SUBMITTED; 380 mid->midState = MID_REQUEST_SUBMITTED;