staging: lustre: use CONFIG_PROC_FS
[cascardo/linux.git] / drivers / staging / lustre / lustre / fld / fld_request.c
index 1f8abba..4efded9 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-# include <linux/libcfs/libcfs.h>
-# include <linux/module.h>
-# include <asm/div64.h>
-
-#include <obd.h>
-#include <obd_class.h>
-#include <lustre_ver.h>
-#include <obd_support.h>
-#include <lprocfs_status.h>
-
-#include <dt_object.h>
-#include <md_object.h>
-#include <lustre_req_layout.h>
-#include <lustre_fld.h>
-#include <lustre_mdc.h>
+#include "../../include/linux/libcfs/libcfs.h"
+#include <linux/module.h>
+#include <asm/div64.h>
+
+#include "../include/obd.h"
+#include "../include/obd_class.h"
+#include "../include/lustre_ver.h"
+#include "../include/obd_support.h"
+#include "../include/lprocfs_status.h"
+
+#include "../include/dt_object.h"
+#include "../include/md_object.h"
+#include "../include/lustre_req_layout.h"
+#include "../include/lustre_fld.h"
+#include "../include/lustre_mdc.h"
 #include "fld_internal.h"
 
 /* TODO: these 3 functions are copies of flow-control code from mdc_lib.c
@@ -138,7 +138,7 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
                        return target;
        }
 
-       CERROR("%s: Can't find target by hash %d (seq "LPX64"). Targets (%d):\n",
+       CERROR("%s: Can't find target by hash %d (seq %#llx). Targets (%d):\n",
                fld->lcf_name, hash, seq, fld->lcf_count);
 
        list_for_each_entry(target, &fld->lcf_targets, ft_chain) {
@@ -148,7 +148,7 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
                        (char *)target->ft_exp->exp_obd->obd_uuid.uuid :
                        "<null>";
 
-               CERROR("  exp: 0x%p (%s), srv: 0x%p (%s), idx: "LPU64"\n",
+               CERROR("  exp: 0x%p (%s), srv: 0x%p (%s), idx: %llu\n",
                       target->ft_exp, exp_name, target->ft_srv,
                       srv_name, target->ft_idx);
        }
@@ -184,9 +184,8 @@ fld_client_get_target(struct lu_client_fld *fld, seqno_t seq)
        spin_unlock(&fld->lcf_lock);
 
        if (target != NULL) {
-               CDEBUG(D_INFO, "%s: Found target (idx "LPU64
-                      ") by seq "LPX64"\n", fld->lcf_name,
-                      target->ft_idx, seq);
+               CDEBUG(D_INFO, "%s: Found target (idx %llu) by seq %#llx\n",
+                      fld->lcf_name, target->ft_idx, seq);
        }
 
        return target;
@@ -208,12 +207,12 @@ int fld_client_add_target(struct lu_client_fld *fld,
        LASSERT(tar->ft_srv != NULL || tar->ft_exp != NULL);
 
        if (fld->lcf_flags != LUSTRE_FLD_INIT) {
-               CERROR("%s: Attempt to add target %s (idx "LPU64") on fly - skip it\n",
+               CERROR("%s: Attempt to add target %s (idx %llu) on fly - skip it\n",
                        fld->lcf_name, name, tar->ft_idx);
                return 0;
        } else {
-               CDEBUG(D_INFO, "%s: Adding target %s (idx "
-                      LPU64")\n", fld->lcf_name, name, tar->ft_idx);
+               CDEBUG(D_INFO, "%s: Adding target %s (idx %llu)\n",
+                      fld->lcf_name, name, tar->ft_idx);
        }
 
        OBD_ALLOC_PTR(target);
@@ -225,7 +224,7 @@ int fld_client_add_target(struct lu_client_fld *fld,
                if (tmp->ft_idx == tar->ft_idx) {
                        spin_unlock(&fld->lcf_lock);
                        OBD_FREE_PTR(target);
-                       CERROR("Target %s exists in FLD and known as %s:#"LPU64"\n",
+                       CERROR("Target %s exists in FLD and known as %s:#%llu\n",
                               name, fld_target_name(tmp), tmp->ft_idx);
                        return -EEXIST;
                }
@@ -274,7 +273,7 @@ EXPORT_SYMBOL(fld_client_del_target);
 
 struct proc_dir_entry *fld_type_proc_dir = NULL;
 
-#ifdef LPROCFS
+#if defined (CONFIG_PROC_FS)
 static int fld_client_proc_init(struct lu_client_fld *fld)
 {
        int rc;
@@ -324,7 +323,6 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
        return;
 }
 #endif
-
 EXPORT_SYMBOL(fld_client_proc_fini);
 
 static inline int hash_is_sane(int hash)
@@ -474,7 +472,7 @@ int fld_client_lookup(struct lu_client_fld *fld, seqno_t seq, mdsno_t *mds,
        target = fld_client_get_target(fld, seq);
        LASSERT(target != NULL);
 
-       CDEBUG(D_INFO, "%s: Lookup fld entry (seq: "LPX64") on target %s (idx "LPU64")\n",
+       CDEBUG(D_INFO, "%s: Lookup fld entry (seq: %#llx) on target %s (idx %llu)\n",
                        fld->lcf_name, seq, fld_target_name(target), target->ft_idx);
 
        res.lsr_start = seq;