Whamcloud - gitweb
LU-1303 fld: verify support for range lookups
[fs/lustre-release.git] / lustre / fld / fld_handler.c
index 3359ef4..1d28b21 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,9 +42,6 @@
  * Author: Pravin Shelar <pravin.shelar@sun.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 #define DEBUG_SUBSYSTEM S_FLD
 
 #ifdef __KERNEL__
@@ -122,6 +117,11 @@ int fld_declare_server_create(struct lu_server_fld *fld,
 
         ENTRY;
 
+       if (fld->lsf_no_range_lookup) {
+               /* Stub for underlying FS which can't lookup ranges */
+               return 0;
+       }
+
         /* for ldiskfs OSD it's enough to declare operation with any ops
          * with DMU we'll probably need to specify exact key/value */
         rc = dt_obj->do_index_ops->dio_declare_delete(env, dt_obj, NULL, th);
@@ -497,7 +497,14 @@ static int fld_server_proc_init(struct lu_server_fld *fld)
                 RETURN(rc);
         }
 
-        RETURN(rc);
+       rc = lprocfs_seq_create(fld->lsf_proc_dir, "fldb", 0444,
+                               &fld_proc_seq_fops, fld);
+       if (rc) {
+               lprocfs_remove(&fld->lsf_proc_dir);
+               fld->lsf_proc_dir = NULL;
+       }
+
+       RETURN(rc);
 }
 
 static void fld_server_proc_fini(struct lu_server_fld *fld)