return next;
}
+static int cmm_device_config(struct lu_device *d, struct lustre_cfg *cfg)
+{
+ struct cmm_device *m = lu2cmm_dev(d);
+ int err;
+
+ switch(cfg->lcfg_command) {
+ case LCFG_CMM_ADD_MDC:
+ err = cmm_add_mdc(m, cfg);
+ break;
+ default:
+ err = -EOPNOTSUPP;
+ }
+out:
+ RETURN(err);
+}
+
+
static struct lu_device_operations cmm_lu_ops = {
.ldo_object_alloc = cmm_object_alloc,
.ldo_object_init = cmm_object_init,
.ldto_device_free = cmm_device_free,
.ldto_device_init = cmm_device_init,
- .ldto_device_fini = cmm_device_fini
+ .ldto_device_fini = cmm_device_fini,
+ .ldto_device_config = cmm_device_config
};
static struct lu_device_type cmm_device_type = {
--- /dev/null
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * lustre/cmm/cmm_device.c
+ * Lustre Cluster Metadata Manager (cmm)
+ *
+ * Copyright (c) 2006 Cluster File Systems, Inc.
+ * Author: Mike Pershin <tappro@clusterfs.com>
+ *
+ * This file is part of the Lustre file system, http://www.lustre.org
+ * Lustre is a trademark of Cluster File Systems, Inc.
+ *
+ * You may have signed or agreed to another license before downloading
+ * this software. If so, you are bound by the terms and conditions
+ * of that agreement, and the following does not apply to you. See the
+ * LICENSE file included with this distribution for more information.
+ *
+ * If you did not agree to a different license, then this copy of Lustre
+ * is open source 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.
+ *
+ * In either case, 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
+ * license text for more details.
+ */
+
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
+#define DEBUG_SUBSYSTEM S_MDS
+
+#include <linux/module.h>
+
+#include <linux/obd.h>
+#include <linux/obd_class.h>
+
+#include "cmm_internal.h"
+
+#include <linux/lprocfs_status.h>
+#include <linux/lustre_ver.h>
+
+int cmm_add_mdc(struct cmm_device * cm, struct lustre_cfg *cfg)
+{
+ const char *mdc = lustre_cfg_string(cfg, 1);
+ const char *index = lustre_cfg_string(cfg, 2);
+ ENTRY;
+
+ CDEBUG(D_INFO, "Add new MDC %s index %s\n", mdc, index);
+ RETURN(0);
+}