From d57f911c1a42e4bf405054687f04aa2a56011ed9 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Wed, 16 Apr 2025 19:52:45 +0000 Subject: [PATCH] LU-18162 ofd: convert Object Filter Device to LU device Convert OFD to use LU device init/fini rather than the legacy OBD API. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I4c1934d04ecafff2217159ef5040e396f4774acc Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58830 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Shaun Tancheff Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- lustre/ofd/ofd_dev.c | 1 + lustre/ofd/ofd_obd.c | 19 ------------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 253d68d..cd114d1 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -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); } diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index a321643..28e6b04 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -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, -- 1.8.3.1