From: Timothy Day Date: Tue, 15 Apr 2025 03:54:19 +0000 (+0000) Subject: LU-18162 osd-ldiskfs: leave osd_device_init() unimplemented X-Git-Tag: 2.16.55~63 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5b6a76e282ab149a53802d47981c7e3e890be138;p=fs%2Flustre-release.git LU-18162 osd-ldiskfs: leave osd_device_init() unimplemented 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 Change-Id: Id5d1c2ad28fe2a659b5c31cc4390cd745bc2b95e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58787 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 933181d..2e2e4b9 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -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)