Whamcloud - gitweb
LU-18162 ofd: convert Object Filter Device to LU device 30/58830/3
authorTimothy Day <timday@amazon.com>
Wed, 16 Apr 2025 19:52:45 +0000 (19:52 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 May 2025 03:56:41 +0000 (03:56 +0000)
Convert OFD to use LU device init/fini rather
than the legacy OBD API.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I4c1934d04ecafff2217159ef5040e396f4774acc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58830
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_obd.c

index 253d68d..cd114d1 100644 (file)
@@ -3167,6 +3167,7 @@ static struct lu_device *ofd_device_fini(const struct lu_env *env,
 {
        ENTRY;
        ofd_fini(env, ofd_dev(d));
+       target_cleanup_recovery(d->ld_obd);
        RETURN(NULL);
 }
 
index a321643..28e6b04 100644 (file)
@@ -1299,24 +1299,6 @@ out:
 }
 
 /**
- * Implementation of obd_ops::o_precleanup.
- *
- * This function stops device activity before shutting it down. It is called
- * from a cleanup function upon forceful device cleanup. For OFD there are no
- * special actions, it just invokes target_recovery_cleanup().
- *
- * \param[in] obd      OBD device of OFD
- *
- * \retval             0
- */
-static int ofd_precleanup(struct obd_device *obd)
-{
-       ENTRY;
-       target_cleanup_recovery(obd);
-       RETURN(0);
-}
-
-/**
  * Implementation of obd_ops::o_health_check.
  *
  * This function checks the OFD device health - ability to respond on
@@ -1414,7 +1396,6 @@ const struct obd_ops ofd_obd_ops = {
        .o_postrecov            = ofd_obd_postrecov,
        .o_getattr              = ofd_echo_getattr,
        .o_iocontrol            = ofd_iocontrol,
-       .o_precleanup           = ofd_precleanup,
        .o_health_check         = ofd_health_check,
        .o_set_info_async       = ofd_set_info_async,
        .o_get_info             = ofd_get_info,