From 6a06834a3f2b357d4fcd1052f0a0a4bbe1577a5e Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Wed, 16 Apr 2025 18:12:29 +0000 Subject: [PATCH] LU-18162 lov: convert Logical Object Volume to LU device Convert LOV to use LU device init/fini rather than the legacy OBD API. Signed-off-by: Timothy Day Change-Id: Ia289e7f0ab31763db258f0c688c7324d737b3f52 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58828 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- lustre/lov/lov_dev.c | 2 ++ lustre/lov/lov_internal.h | 1 + lustre/lov/lov_obd.c | 4 +--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/lov/lov_dev.c b/lustre/lov/lov_dev.c index f5cab73..83b7c03 100644 --- a/lustre/lov/lov_dev.c +++ b/lustre/lov/lov_dev.c @@ -301,6 +301,8 @@ static struct lu_device *lov_device_free(const struct lu_env *env, struct lov_device *ld = lu2lov_dev(d); const int nr = ld->ld_target_nr; + lov_cleanup(d->ld_obd); + lu_site_fini(&ld->ld_site); cl_device_fini(lu2cl_dev(d)); diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index 867df6b..567a2f5 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -291,6 +291,7 @@ __u16 lov_get_stripe_count(struct lov_obd *lov, __u32 magic, int lov_connect_obd(struct obd_device *obd, u32 index, int activate, struct obd_connect_data *data); int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg); +int lov_cleanup(struct obd_device *obd); int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, u32 *indexp, int *genp); int lov_del_target(struct obd_device *obd, u32 index, diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index d3a4ad2..b147198 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -745,7 +745,7 @@ out: return rc; } -static int lov_cleanup(struct obd_device *obd) +int lov_cleanup(struct obd_device *obd) { struct lu_tgt_descs *ltd = &obd->u.lov.lov_ost_descs; struct lov_obd *lov = &obd->u.lov; @@ -1314,8 +1314,6 @@ static int lov_quotactl(struct obd_device *obd, struct obd_export *exp, static const struct obd_ops lov_obd_ops = { .o_owner = THIS_MODULE, - .o_setup = lov_setup, - .o_cleanup = lov_cleanup, .o_connect = lov_connect, .o_disconnect = lov_disconnect, .o_statfs = lov_statfs, -- 1.8.3.1