-#if 0
-static int mgc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
- void *karg, void *uarg)
-{
- struct obd_device *obd = exp->exp_obd;
- struct obd_ioctl_data *data = karg;
- struct llog_ctxt *ctxt;
- struct lvfs_run_ctxt saved;
- int rc;
- ENTRY;
-
- if (!cfs_try_module_get(THIS_MODULE)) {
- CERROR("Can't get module. Is it alive?");
- return -EINVAL;
- }
- switch (cmd) {
- /* REPLicator context */
- case OBD_IOC_PARSE: {
- CERROR("MGC parsing llog %s\n", data->ioc_inlbuf1);
- ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
- rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
- GOTO(out, rc);
- }
-#ifdef __KERNEL__
- case OBD_IOC_LLOG_INFO:
- case OBD_IOC_LLOG_PRINT: {
- ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
- rc = llog_ioctl(ctxt, cmd, data);
-
- GOTO(out, rc);
- }
-#endif
- /* ORIGinator context */
- case OBD_IOC_DUMP_LOG: {
- ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- if (rc)
- RETURN(rc);
-
- GOTO(out, rc);
- }
- default:
- CERROR("mgc_ioctl(): unrecognised ioctl %#x\n", cmd);
- GOTO(out, rc = -ENOTTY);
- }
-out:
- cfs_module_put(THIS_MODULE);
-
- return rc;
-}
-#endif
-