cifs: add cifs_async_readv
commite28bc5b1fdbd6e850488234d6072e6b66fc46146
authorJeff Layton <jlayton@redhat.com>
Wed, 19 Oct 2011 19:30:07 +0000 (19 15:30 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 19 Oct 2011 19:30:07 +0000 (19 15:30 -0400)
tree7d5292bb0389b1153fd11f738fe8644cdfb040d1
parent2ab2593f4b8953ff951f5531e695e487dfe0b51f
cifs: add cifs_async_readv

...which will allow cifs to do an asynchronous read call to the server.
The caller will allocate and set up cifs_readdata for each READ_AND_X
call that should be issued on the wire. The pages passed in are added
to the pagecache, but not placed on the LRU list yet (as we need the
page->lru to keep the pages on the list in the readdata).

When cifsd identifies the mid, it will see that there is a special
receive handler for the call, and use that to receive the rest of the
frame. cifs_readv_receive will then marshal up a kvec array with
kmapped pages from the pagecache, which eliminates one copy of the
data. Once the data is received, the pages are added to the LRU list,
set uptodate, and unlocked.

Reviewed-and-Tested-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c