From bb9ca68a8e9bb7c97d0dcc0a4309859cfe5b214d Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 7 Apr 2006 14:36:12 +0000 Subject: [PATCH] make MDS very simple. It is needed only for setup and maybe for some global things later. --- lustre/mds/handler.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 21928cf..7ed8c41 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2642,9 +2642,52 @@ static void /*__exit*/ mds_exit(void) class_unregister_type(LUSTRE_MDT_NAME); } +static int mds_cmd_setup(struct obd_device *obd, struct lustre_cfg *lcfg) +{ + ENTRY; + + RETURN(0); +} + +static int mds_cmd_cleanup(struct obd_device *obd) +{ + ENTRY; + + RETURN(0); +} + + +static int mds_cmd_health_check(struct obd_device *obd) +{ + return 0; +} + +static struct obd_ops mds_cmd_obd_ops = { + .o_owner = THIS_MODULE, + .o_setup = mds_cmd_setup, + .o_cleanup = mds_cmd_cleanup, + .o_health_check = mds_cmd_health_check, +}; + +static int __init mds_cmd_init(void) +{ + struct lprocfs_static_vars lvars; + + lprocfs_init_vars(mds, &lvars); + class_register_type(&mds_cmd_obd_ops, lvars.module_vars, + LUSTRE_MDS_NAME); + + return 0; +} + +static void /*__exit*/ mds_cmd_exit(void) +{ + class_unregister_type(LUSTRE_MDS_NAME); +} + MODULE_AUTHOR("Cluster File Systems, Inc. "); MODULE_DESCRIPTION("Lustre Metadata Server (MDS)"); MODULE_LICENSE("GPL"); -module_init(mds_init); -module_exit(mds_exit); +module_init(mds_cmd_init); +module_exit(mds_cmd_exit); -- 1.8.3.1