Whamcloud - gitweb
LU-18162 lov: convert Logical Object Volume to LU device 28/58828/3
authorTimothy Day <timday@amazon.com>
Wed, 16 Apr 2025 18:12:29 +0000 (18:12 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 May 2025 03:56:22 +0000 (03:56 +0000)
Convert LOV to use LU device init/fini rather
than the legacy OBD API.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ia289e7f0ab31763db258f0c688c7324d737b3f52
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58828
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/lov/lov_dev.c
lustre/lov/lov_internal.h
lustre/lov/lov_obd.c

index f5cab73..83b7c03 100644 (file)
@@ -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));
index 867df6b..567a2f5 100644 (file)
@@ -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,
index d3a4ad2..b147198 100644 (file)
@@ -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,