summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2017-04-25 11:52:29 -0700
committerSteve French <smfrench@gmail.com>2017-05-02 14:57:34 -0500
commitccf7f4088af2dd6733bfcbc40b488e2484345ae5 (patch)
treee36e26b596216f44e08266913ae9fd5d7a0ebc64 /fs/cifs/cifsproto.h
parent29bb3158cf6a5ad7b3521d1229552f375107a58c (diff)
downloadlinux-stable-ccf7f4088af2dd6733bfcbc40b488e2484345ae5.tar.gz
linux-stable-ccf7f4088af2dd6733bfcbc40b488e2484345ae5.tar.bz2
linux-stable-ccf7f4088af2dd6733bfcbc40b488e2484345ae5.zip
CIFS: Add asynchronous context to support kernel AIO
Currently the code doesn't recognize asynchronous calls passed by io_submit() and processes all calls synchronously. This is not what kernel AIO expects. This patch introduces a new async context that keeps track of all issued i/o requests and moves a response collecting procedure to a separate thread. This allows to return to a caller immediately for async calls and call iocb->ki_complete() once all requests are completed. For sync calls the current thread simply waits until all requests are completed. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 97e5d236d265..e49958c3f8bb 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -535,4 +535,7 @@ int __cifs_calc_signature(struct smb_rqst *rqst,
struct shash_desc *shash);
enum securityEnum cifs_select_sectype(struct TCP_Server_Info *,
enum securityEnum);
+struct cifs_aio_ctx *cifs_aio_ctx_alloc(void);
+void cifs_aio_ctx_release(struct kref *refcount);
+int setup_aio_ctx_iter(struct cifs_aio_ctx *ctx, struct iov_iter *iter, int rw);
#endif /* _CIFSPROTO_H */