Whamcloud - gitweb
LU-18876 osp: rename conflicting ping_show 28/58628/5
authorTimothy Day <timday@amazon.com>
Wed, 2 Apr 2025 15:33:56 +0000 (11:33 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 May 2025 02:18:56 +0000 (02:18 +0000)
The function ping_show() is defined twice: once is OSP
and another time in Portals RPC. This causes a linker
error when the Lustre modules are built into the static
kernel image. Rename the ping_show() in OSP to
osp_ping_show() and adjust the attribute definition to
match.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ibe21f0714a22637f365c9bd1f5cac31608e65cbf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58628
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osp/lproc_osp.c

index 4e7630a..12b0c14 100644 (file)
@@ -859,8 +859,8 @@ static ssize_t lfsck_max_rpcs_in_flight_store(struct kobject *kobj,
 }
 LUSTRE_RW_ATTR(lfsck_max_rpcs_in_flight);
 
-ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
-                 char *buffer)
+ssize_t osp_ping_show(struct kobject *kobj, struct attribute *attr,
+                     char *buffer)
 {
        struct dt_device *dt = container_of(kobj, struct dt_device,
                                            dd_kobj);
@@ -872,7 +872,7 @@ ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
 
        return rc;
 }
-LUSTRE_RO_ATTR(ping);
+LUSTRE_ATTR(ping, 0444, osp_ping_show, NULL);
 
 static ssize_t osp_conn_uuid_show(struct kobject *kobj, struct attribute *attr,
                                  char *buf)