summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-07-27 14:41:18 -0400
committerChuck Lever <chuck.lever@oracle.com>2022-07-29 20:17:00 -0400
commita11ada99ce93a79393dc6683d22f7915748c8f6b (patch)
treee7dd52ee1ae000179701e9658c655889eaeac370 /fs/nfsd/xdr4.h
parente72f9bc006c08841c46d27747a4debc747a8fe13 (diff)
downloadlinux-stable-a11ada99ce93a79393dc6683d22f7915748c8f6b.tar.gz
linux-stable-a11ada99ce93a79393dc6683d22f7915748c8f6b.tar.bz2
linux-stable-a11ada99ce93a79393dc6683d22f7915748c8f6b.zip
NFSD: Move copy offload callback arguments into a separate structure
Refactor so that CB_OFFLOAD arguments can be passed without allocating a whole struct nfsd4_copy object. On my system (x86_64) this removes another 96 bytes from struct nfsd4_copy. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index eb09bf5aa70e..8c8d7b503096 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -533,6 +533,13 @@ struct nfsd42_write_res {
stateid_t cb_stateid;
};
+struct nfsd4_cb_offload {
+ struct nfsd4_callback co_cb;
+ struct nfsd42_write_res co_res;
+ __be32 co_nfserr;
+ struct knfsd_fh co_fh;
+};
+
struct nfsd4_copy {
/* request */
stateid_t cp_src_stateid;
@@ -550,10 +557,6 @@ struct nfsd4_copy {
/* response */
struct nfsd42_write_res cp_res;
-
- /* for cb_offload */
- struct nfsd4_callback cp_cb;
- __be32 nfserr;
struct knfsd_fh fh;
struct nfs4_client *cp_clp;