Whamcloud - gitweb
LU-6540 test: fix no %s specifier for the file
[fs/lustre-release.git] / lustre / osp / lwp_dev.c
index 7587560..dccfef4 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);
 }