Whamcloud - gitweb
LU-6158 mdt: always shrink_capsule in getxattr_all
[fs/lustre-release.git] / lustre / osp / lwp_dev.c
index 7587560..a5ecc88 100644 (file)
@@ -21,7 +21,7 @@
  * 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
@@ -42,7 +42,8 @@
 #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;
@@ -220,7 +221,7 @@ static int lwp_process_config(const struct lu_env *env,
        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,
 };
 
@@ -236,8 +237,8 @@ const struct lu_device_operations lwp_lu_ops = {
  * \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;
@@ -267,8 +268,10 @@ int lwp_init0(const struct lu_env *env, struct lwp_device *lwp,
                RETURN(rc);
        }
 
-       if (lprocfs_seq_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);
 }
@@ -360,11 +363,6 @@ static struct lu_device *lwp_device_fini(const struct lu_env *env,
 
        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);