* GPL HEADER END
*/
/*
- * Copyright (c) 2013, Intel Corporation.
+ * Copyright (c) 2013, 2014, Intel Corporation.
* Use is subject to license terms.
*
* lustre/osp/lwp_dev.c
#include <obd_class.h>
#include <lustre_param.h>
#include <lustre_log.h>
-#include <libcfs/libcfs_string.h>
+
+#include "osp_internal.h"
struct lwp_device {
struct lu_device lpd_dev;
RETURN(rc);
}
-const struct lu_device_operations lwp_lu_ops = {
+static const struct lu_device_operations lwp_lu_ops = {
.ldo_process_config = lwp_process_config,
};
* \retval -ENODEV if the device name cannot be found
* \retval negative numbers on other errors
*/
-int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
- struct lu_device_type *ldt, struct lustre_cfg *cfg)
+static int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
+ struct lu_device_type *ldt, struct lustre_cfg *cfg)
{
int rc;
ENTRY;
RETURN(rc);
}
- if (lprocfs_obd_setup(lwp->lpd_obd) == 0)
+ if (lprocfs_obd_setup(lwp->lpd_obd) == 0) {
+ sptlrpc_lprocfs_cliobd_attach(lwp->lpd_obd);
ptlrpc_lprocfs_register_obd(lwp->lpd_obd);
+ }
RETURN(0);
}
imp = m->lpd_obd->u.cli.cl_import;
- if (imp->imp_rq_pool) {
- ptlrpc_free_rq_pool(imp->imp_rq_pool);
- imp->imp_rq_pool = NULL;
- }
-
LASSERT(m->lpd_obd);
ptlrpc_lprocfs_unregister_obd(m->lpd_obd);
lprocfs_obd_cleanup(m->lpd_obd);
return 0;
}
+static int lwp_set_info_async(const struct lu_env *env,
+ struct obd_export *exp,
+ u32 keylen, void *key,
+ u32 vallen, void *val,
+ struct ptlrpc_request_set *set)
+{
+ ENTRY;
+
+ if (KEY_IS(KEY_SPTLRPC_CONF)) {
+ sptlrpc_conf_client_adapt(exp->exp_obd);
+ RETURN(0);
+ }
+
+ CERROR("Unknown key %s\n", (char *)key);
+ RETURN(-EINVAL);
+}
+
struct obd_ops lwp_obd_device_ops = {
.o_owner = THIS_MODULE,
.o_add_conn = client_import_add_conn,
.o_connect = lwp_obd_connect,
.o_disconnect = lwp_obd_disconnect,
.o_import_event = lwp_import_event,
+ .o_set_info_async = lwp_set_info_async,
};