/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * lustre/mgc/mgc_request.c
- * Lustre Management Client
+ * GPL HEADER START
*
- * Copyright (C) 2006 Cluster File Systems, Inc.
- * Author: Nathan Rutman <nathan@clusterfs.com>
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * This file is part of Lustre, http://www.lustre.org
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
*
- * Lustre is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
*
- * Lustre is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
- * You should have received a copy of the GNU General Public License
- * along with Lustre; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
*
+ * GPL HEADER END
*/
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Use is subject to license terms.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * lustre/mgc/libmgc.c
+ *
+ * Lustre Management Client
+ * Author: Nathan Rutman <nathan@clusterfs.com>
+ */
+
/* Minimal MGC for liblustre: only used to read the config log from the MGS
at setup time, no updates. */
-
+
#ifndef EXPORT_SYMTAB
# define EXPORT_SYMTAB
#endif
if (rc)
GOTO(err_decref, rc);
- rc = obd_llog_init(obd, OBD_LLOG_GROUP, obd, 0, NULL, NULL);
+ /* liblustre only support null flavor to MGS */
+ obd->u.cli.cl_flvr_mgc.sf_rpc = SPTLRPC_FLVR_NULL;
+
+ rc = obd_llog_init(obd, &obd->obd_olg, obd, 0, NULL, NULL);
if (rc) {
CERROR("failed to setup llogging subsystems\n");
GOTO(err_cleanup, rc);
ENTRY;
switch (stage) {
- case OBD_CLEANUP_EARLY:
+ case OBD_CLEANUP_EARLY:
case OBD_CLEANUP_EXPORTS:
- break;
- case OBD_CLEANUP_SELF_EXP:
rc = obd_llog_finish(obd, 0);
if (rc != 0)
CERROR("failed to cleanup llogging subsystems\n");
break;
- case OBD_CLEANUP_OBD:
- break;
}
RETURN(rc);
}
ENTRY;
LASSERT(cli->cl_mgc_vfsmnt == NULL);
-
+
ptlrpcd_decref();
rc = client_obd_cleanup(obd);
RETURN(rc);
}
-static int mgc_llog_init(struct obd_device *obd, int group,
- struct obd_device *tgt, int count,
+static int mgc_llog_init(struct obd_device *obd, struct obd_llog_group *olg,
+ struct obd_device *tgt, int count,
struct llog_catid *logid, struct obd_uuid *uuid)
{
struct llog_ctxt *ctxt;
- struct obd_llog_group *olg = &obd->obd_olg;
int rc;
ENTRY;
- LASSERT(group == olg->olg_group);
- LASSERT(group == OBD_LLOG_GROUP);
+ LASSERT(olg == &obd->obd_olg);
rc = llog_setup(obd, olg, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL,
&llog_client_ops);
if (rc == 0) {
int __init mgc_init(void)
{
- return class_register_type(&mgc_obd_ops, NULL,
+ return class_register_type(&mgc_obd_ops, NULL,
NULL, LUSTRE_MGC_NAME, NULL);
}
-