From 6e6e2b86c29c6fcfa16ad9fdc7ea32027bea5d73 Mon Sep 17 00:00:00 2001 From: Long Li Date: Wed, 31 Oct 2018 22:13:09 +0000 Subject: CIFS: Add support for direct I/O read With direct I/O read, we transfer the data directly from transport layer to the user data buffer. Change in v3: add support for kernel AIO Change in v4: Refactor common read code to __cifs_readv for direct and non-direct I/O. Retry on direct I/O failure. Signed-off-by: Long Li Signed-off-by: Steve French --- fs/cifs/cifsglob.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/cifs/cifsglob.h') diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index d7c0443d47a4..38ab0fca49e1 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -1186,6 +1186,11 @@ struct cifs_aio_ctx { unsigned int len; unsigned int total_len; bool should_dirty; + /* + * Indicates if this aio_ctx is for direct_io, + * If yes, iter is a copy of the user passed iov_iter + */ + bool direct_io; }; struct cifs_readdata; -- cgit v1.2.3