* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
static struct cfs_cpt_table *ost_io_cptable;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
LPROC_SEQ_FOPS_RO_TYPE(ost, uuid);
-static struct lprocfs_seq_vars lprocfs_ost_obd_vars[] = {
+static struct lprocfs_vars lprocfs_ost_obd_vars[] = {
{ .name = "uuid",
.fops = &ost_uuid_fops },
- { 0 }
+ { NULL }
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */
/* Sigh - really, this is an OSS, the _server_, not the _target_ */
static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
int rc;
ENTRY;
- rc = cfs_cleanup_group_info();
- if (rc)
- RETURN(rc);
-
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
obd->obd_vars = lprocfs_ost_obd_vars;
- lprocfs_seq_obd_setup(obd);
+ lprocfs_obd_setup(obd);
#endif
mutex_init(&ost->ost_health_mutex);
static int ost_health_check(const struct lu_env *env, struct obd_device *obd)
{
- struct ost_obd *ost = &obd->u.ost;
- int rc = 0;
+ struct ost_obd *ost = &obd->u.ost;
+ int rc = 0;
mutex_lock(&ost->ost_health_mutex);
- rc |= ptlrpc_service_health_check(ost->ost_service);
- rc |= ptlrpc_service_health_check(ost->ost_create_service);
- rc |= ptlrpc_service_health_check(ost->ost_io_service);
+ rc |= ptlrpc_service_health_check(ost->ost_service);
+ rc |= ptlrpc_service_health_check(ost->ost_create_service);
+ rc |= ptlrpc_service_health_check(ost->ost_io_service);
+ rc |= ptlrpc_service_health_check(ost->ost_seq_service);
mutex_unlock(&ost->ost_health_mutex);
- /*
- * health_check to return 0 on healthy
- * and 1 on unhealthy.
- */
- if( rc != 0)
- rc = 1;
-
- return rc;
+ return rc != 0 ? 1 : 0;
}
/* use obd ops to offer management infrastructure */
ENTRY;
rc = class_register_type(&ost_obd_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
- NULL,
-#endif
LUSTRE_OSS_NAME, NULL);
if (ost_num_threads != 0 && oss_num_threads == 0) {