Whamcloud - gitweb
LU-18162 osd-ldiskfs: leave osd_device_init() unimplemented 87/58787/3
authorTimothy Day <timday@amazon.com>
Tue, 15 Apr 2025 03:54:19 +0000 (03:54 +0000)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 May 2025 02:20:14 +0000 (02:20 +0000)
osd_device_init() is never called when using ldiskfs OSD. If it is
called, procfs will improperly be initialized twice. To avoid this
would require a refactor or leaving osd_device_init() as a stub.
For now, remove all functional (uncalled) code from the function
and return 0.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id5d1c2ad28fe2a659b5c31cc4390cd745bc2b95e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58787
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c

index 933181d..2e2e4b9 100644 (file)
@@ -8156,12 +8156,7 @@ struct lu_context_key osd_key = {
 static int osd_device_init(const struct lu_env *env, struct lu_device *d,
                           const char *name, struct lu_device *next)
 {
-       struct osd_device *osd = osd_dev(d);
-       int cplen = strscpy(osd->od_svname, name, sizeof(osd->od_svname));
-
-       if (cplen < 0)
-               return cplen;
-       return osd_procfs_init(osd, name);
+       return 0;
 }
 
 static int osd_shutdown(const struct lu_env *env, struct osd_device *o)