Whamcloud - gitweb
LU-1154 clio: rename coo_attr_set to coo_attr_update
[fs/lustre-release.git] / lustre / obdclass / cl_object.c
index 97978f8..e400f30 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -58,6 +58,7 @@
 #include <libcfs/list.h>
 #include <libcfs/libcfs_hash.h> /* for cfs_hash stuff */
 #include <cl_object.h>
+#include <lu_object.h>
 #include "cl_internal.h"
 
 static struct kmem_cache *cl_env_kmem;
@@ -65,8 +66,6 @@ static struct kmem_cache *cl_env_kmem;
 /** Lock class of cl_object_header::coh_attr_guard */
 static struct lock_class_key cl_attr_guard_class;
 
-extern __u32 lu_context_tags_default;
-extern __u32 lu_session_tags_default;
 /**
  * Initialize cl_object_header.
  */
@@ -177,7 +176,7 @@ static spinlock_t *cl_object_attr_guard(struct cl_object *o)
  *
  * Prevents data-attributes from changing, until lock is released by
  * cl_object_attr_unlock(). This has to be called before calls to
- * cl_object_attr_get(), cl_object_attr_set().
+ * cl_object_attr_get(), cl_object_attr_update().
  */
 void cl_object_attr_lock(struct cl_object *o)
 __acquires(cl_object_attr_guard(o))
@@ -232,11 +231,11 @@ EXPORT_SYMBOL(cl_object_attr_get);
  * Updates data-attributes of an object \a obj.
  *
  * Only attributes, mentioned in a validness bit-mask \a v are
- * updated. Calls cl_object_operations::coo_attr_set() on every layer, bottom
+ * updated. Calls cl_object_operations::coo_upd_attr() on every layer, bottom
  * to top.
  */
-int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
-                       const struct cl_attr *attr, unsigned v)
+int cl_object_attr_update(const struct lu_env *env, struct cl_object *obj,
+                         const struct cl_attr *attr, unsigned v)
 {
        struct lu_object_header *top;
        int result;
@@ -247,8 +246,9 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
        top = obj->co_lu.lo_header;
        result = 0;
        list_for_each_entry_reverse(obj, &top->loh_layers, co_lu.lo_linkage) {
-               if (obj->co_ops->coo_attr_set != NULL) {
-                       result = obj->co_ops->coo_attr_set(env, obj, attr, v);
+               if (obj->co_ops->coo_attr_update != NULL) {
+                       result = obj->co_ops->coo_attr_update(env, obj, attr,
+                                                             v);
                        if (result != 0) {
                                if (result > 0)
                                        result = 0;
@@ -258,7 +258,7 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj,
        }
        RETURN(result);
 }
-EXPORT_SYMBOL(cl_object_attr_set);
+EXPORT_SYMBOL(cl_object_attr_update);
 
 /**
  * Notifies layers (bottom-to-top) that glimpse AST was received.
@@ -386,7 +386,8 @@ void cache_stats_init(struct cache_stats *cs, const char *name)
                atomic_set(&cs->cs_stats[i], 0);
 }
 
-int cache_stats_print(const struct cache_stats *cs, struct seq_file *m, int h)
+static int cache_stats_print(const struct cache_stats *cs,
+                            struct seq_file *m, int h)
 {
        int i;