Skip to content

Commit fb80f52

Browse files
committed
Merge: nfsd: Set technology preview if inter SSC offload is enabled
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3070 JIRA: https://issues.redhat.com/browse/RHEL-2300 Upstream Status: RHEL-only Send a warning into the system log if inter server-to-server copy offload is enabled. Signed-off-by: Dave Wysochanski <[email protected]> Approved-by: Jeffrey Layton <[email protected]> Approved-by: Steve Dickson <[email protected]> Approved-by: Benjamin Coddington <[email protected]> Signed-off-by: Scott Weaver <[email protected]>
2 parents b83ca92 + 9a0f4dd commit fb80f52

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <linux/slab.h>
3939
#include <linux/kthread.h>
4040
#include <linux/namei.h>
41+
#include <linux/moduleparam.h>
4142

4243
#include <linux/sunrpc/addr.h>
4344
#include <linux/nfs_ssc.h>
@@ -52,8 +53,29 @@
5253
#include "pnfs.h"
5354
#include "trace.h"
5455

56+
static int param_set_inter_copy_offload(const char *val,
57+
const struct kernel_param *kp)
58+
{
59+
bool enable;
60+
int ret;
61+
62+
ret = kstrtobool(val, &enable);
63+
if (ret)
64+
return ret;
65+
66+
if (enable)
67+
mark_tech_preview("Inter server-to-server copy offload", NULL);
68+
69+
return param_set_bool(val, kp);
70+
}
71+
72+
static const struct kernel_param_ops param_ops_inter_copy_offload = {
73+
.set = param_set_inter_copy_offload,
74+
.get = param_get_bool,
75+
};
76+
#define param_check_inter_copy_offload(name, p) __param_check(name, p, bool)
5577
static bool inter_copy_offload_enable;
56-
module_param(inter_copy_offload_enable, bool, 0644);
78+
module_param(inter_copy_offload_enable, inter_copy_offload, 0644);
5779
MODULE_PARM_DESC(inter_copy_offload_enable,
5880
"Enable inter server to server copy offload. Default: false");
5981

0 commit comments

Comments
 (0)