summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-03-09 11:01:12 +0000
committerDavid Howells <dhowells@redhat.com>2024-05-01 18:08:18 +0100
commit753b67eb630db34e36ec4ae1e86c75e243ea4fc9 (patch)
tree61bf7f01360fe01f9897ebbbf8758c5bd462ab09 /fs/smb/client/cifsglob.h
parent0f7c0f3f51501a472a08d16315903d17012325ca (diff)
downloadlinux-stable-753b67eb630db34e36ec4ae1e86c75e243ea4fc9.tar.gz
linux-stable-753b67eb630db34e36ec4ae1e86c75e243ea4fc9.tar.bz2
linux-stable-753b67eb630db34e36ec4ae1e86c75e243ea4fc9.zip
cifs: Replace cifs_readdata with a wrapper around netfs_io_subrequest
Netfslib has a facility whereby the allocation for netfs_io_subrequest can be increased to so that filesystem-specific data can be tagged on the end. Prepare to use this by making a struct, cifs_io_subrequest, that wraps netfs_io_subrequest, and absorb struct cifs_readdata into it. Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Shyam Prasad N <nspmangalore@gmail.com> cc: Rohith Surabattula <rohiths.msft@gmail.com> cc: Jeff Layton <jlayton@kernel.org> cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 6ff35570db81..405110052e17 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -268,7 +268,7 @@ struct dfs_info3_param;
struct cifs_fattr;
struct smb3_fs_context;
struct cifs_fid;
-struct cifs_readdata;
+struct cifs_io_subrequest;
struct cifs_writedata;
struct cifs_io_parms;
struct cifs_search_info;
@@ -450,7 +450,7 @@ struct smb_version_operations {
/* send a flush request to the server */
int (*flush)(const unsigned int, struct cifs_tcon *, struct cifs_fid *);
/* async read from the server */
- int (*async_readv)(struct cifs_readdata *);
+ int (*async_readv)(struct cifs_io_subrequest *);
/* async write to the server */
int (*async_writev)(struct cifs_writedata *,
void (*release)(struct kref *));
@@ -1493,26 +1493,28 @@ struct cifs_aio_ctx {
};
/* asynchronous read support */
-struct cifs_readdata {
- struct kref refcount;
- struct list_head list;
- struct completion done;
+struct cifs_io_subrequest {
+ struct netfs_io_subrequest subreq;
struct cifsFileInfo *cfile;
struct address_space *mapping;
struct cifs_aio_ctx *ctx;
- __u64 offset;
ssize_t got_bytes;
- unsigned int bytes;
pid_t pid;
int result;
- struct work_struct work;
- struct iov_iter iter;
struct kvec iov[2];
struct TCP_Server_Info *server;
#ifdef CONFIG_CIFS_SMB_DIRECT
struct smbd_mr *mr;
#endif
struct cifs_credits credits;
+
+ // TODO: Remove following elements
+ struct list_head list;
+ struct completion done;
+ struct work_struct work;
+ struct iov_iter iter;
+ __u64 offset;
+ unsigned int bytes;
};
/* asynchronous write support */