Whamcloud - gitweb
LU-2075 fld: use predefined FIDs
[fs/lustre-release.git] / lustre / fld / fld_handler.c
index 9f3f1ef..4b1c2e2 100644 (file)
@@ -76,13 +76,6 @@ LU_CONTEXT_KEY_DEFINE(fld, LCT_MD_THREAD|LCT_DT_THREAD);
 
 cfs_proc_dir_entry_t *fld_type_proc_dir = NULL;
 
-static struct lu_local_obj_desc llod_fld_index = {
-        .llod_name      = fld_index_name,
-        .llod_oid       = FLD_INDEX_OID,
-        .llod_is_index  = 1,
-        .llod_feat      = &fld_index_features,
-};
-
 static int __init fld_mod_init(void)
 {
         fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
@@ -91,8 +84,6 @@ static int __init fld_mod_init(void)
         if (IS_ERR(fld_type_proc_dir))
                 return PTR_ERR(fld_type_proc_dir);
 
-        llo_local_obj_register(&llod_fld_index);
-
         LU_CONTEXT_KEY_INIT(&fld_thread_key);
         lu_context_key_register(&fld_thread_key);
         return 0;
@@ -100,7 +91,6 @@ static int __init fld_mod_init(void)
 
 static void __exit fld_mod_exit(void)
 {
-        llo_local_obj_unregister(&llod_fld_index);
         lu_context_key_degister(&fld_thread_key);
         if (fld_type_proc_dir != NULL && !IS_ERR(fld_type_proc_dir)) {
                 lprocfs_remove(&fld_type_proc_dir);
@@ -117,6 +107,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);