/*
* This file is part of Lustre, http://www.lustre.org/
*
- * lustre/ost/ost_handler.c
+ * lustre/ofd/ofd_oss.c
*
* Author: Peter J. Braam <braam@clusterfs.com>
* Author: Phil Schwan <phil@clusterfs.com>
#include <lprocfs_status.h>
#include <lustre_nodemap.h>
#include <obd_class.h>
-#include "ost_internal.h"
+
+#define OSS_SERVICE_WATCHDOG_FACTOR 2
int oss_max_threads = 512;
module_param(oss_max_threads, int, 0444);
static struct cfs_cpt_table *ost_io_cptable;
/* Sigh - really, this is an OSS, the _server_, not the _target_ */
-static int ost_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
+static int oss_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
static struct ptlrpc_service_conf svc_conf;
struct ost_obd *ost = obd2ost(obd);
obd->obd_debugfs_entry);
if (IS_ERR(ost->ost_service)) {
rc = PTR_ERR(ost->ost_service);
- CERROR("failed to start service: %d\n", rc);
+ CERROR("oss: failed to start service: %d\n", rc);
GOTO(out_lprocfs, rc);
}
);
if (IS_ERR(ost->ost_create_service)) {
rc = PTR_ERR(ost->ost_create_service);
- CERROR("failed to start OST create service: %d\n", rc);
+ CERROR("oss: failed to start OST create service: %d\n", rc);
GOTO(out_service, rc);
}
ost_io_cptable = cfs_cpt_table_alloc(nodes_weight(*mask));
for_each_node_mask(i, *mask) {
if (!ost_io_cptable) {
- CWARN("OSS failed to create CPT table\n");
+ CWARN("oss: failed to create CPT table\n");
break;
}
rc = cfs_cpt_set_node(ost_io_cptable, cpt++, i);
if (!rc) {
- CWARN("OSS Failed to set node %d for IO CPT table\n",
+ CWARN("oss: Failed to set node %d for IO CPT table\n",
i);
cfs_cpt_table_free(ost_io_cptable);
ost_io_cptable = NULL;
obd->obd_debugfs_entry);
if (IS_ERR(ost->ost_io_service)) {
rc = PTR_ERR(ost->ost_io_service);
- CERROR("failed to start OST I/O service: %d\n", rc);
+ CERROR("oss: failed to start OST I/O service: rc = %d\n", rc);
ost->ost_io_service = NULL;
GOTO(out_create, rc);
}
obd->obd_debugfs_entry);
if (IS_ERR(ost->ost_seq_service)) {
rc = PTR_ERR(ost->ost_seq_service);
- CERROR("failed to start OST seq service: %d\n", rc);
+ CERROR("oss: failed to start OST seq service: %d\n", rc);
ost->ost_seq_service = NULL;
GOTO(out_io, rc);
}
obd->obd_debugfs_entry);
if (IS_ERR(ost->ost_out_service)) {
rc = PTR_ERR(ost->ost_out_service);
- CERROR("failed to start out service: %d\n", rc);
+ CERROR("oss: failed to start out service: %d\n", rc);
ost->ost_out_service = NULL;
GOTO(out_seq, rc);
}
RETURN(rc);
}
-static int ost_cleanup(struct obd_device *obd)
+static int oss_cleanup(struct obd_device *obd)
{
struct ost_obd *ost = obd2ost(obd);
int err = 0;
RETURN(err);
}
-static int ost_health_check(const struct lu_env *env, struct obd_device *obd)
+static int oss_health_check(const struct lu_env *env, struct obd_device *obd)
{
struct ost_obd *ost = obd2ost(obd);
int rc = 0;
}
/* use obd ops to offer management infrastructure */
-static const struct obd_ops ost_obd_ops = {
+static const struct obd_ops oss_obd_ops = {
.o_owner = THIS_MODULE,
- .o_setup = ost_setup,
- .o_cleanup = ost_cleanup,
- .o_health_check = ost_health_check,
+ .o_setup = oss_setup,
+ .o_cleanup = oss_cleanup,
+ .o_health_check = oss_health_check,
.o_iocontrol = oss_iocontrol,
};
-static int __init ost_init(void)
+int oss_mod_init(void)
{
int rc;
if (rc)
RETURN(rc);
- rc = class_register_type(&ost_obd_ops, NULL, false,
+ rc = class_register_type(&oss_obd_ops, NULL, false,
LUSTRE_OSS_NAME, NULL);
RETURN(rc);
}
-static void __exit ost_exit(void)
+void oss_mod_exit(void)
{
class_unregister_type(LUSTRE_OSS_NAME);
}
-
-MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
-MODULE_DESCRIPTION("Lustre Object Storage Target (OST)");
-MODULE_VERSION(LUSTRE_VERSION_STRING);
-MODULE_LICENSE("GPL");
-
-module_init(ost_init);
-module_exit(ost_exit);
+++ /dev/null
-#
-# GPL HEADER START
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# 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.
-#
-# 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).
-#
-# You should have received a copy of the GNU General Public License
-# version 2 along with this program; If not, see
-# http://www.gnu.org/licenses/gpl-2.0.html
-#
-# GPL HEADER END
-#
-
-#
-# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-if MODULES
-modulefs_DATA = ost$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
+++ /dev/null
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * 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.
- *
- * 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).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (c) 2012, 2013, Intel Corporation.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- */
-
-#ifndef OST_INTERNAL_H
-#define OST_INTERNAL_H
-
-#define OSS_SERVICE_WATCHDOG_FACTOR 2
-
-#endif /* OST_INTERNAL_H */