X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fcl_object.c;h=5ab8a92b013f44c52b7a4244b22fd7b34f01cab5;hb=2d617260aaa5f778ab8dcb006e2a827f4b8f8567;hp=9e65b3a1a4bd80001bdda3e376f5280523d1e174;hpb=9f55850b884cac1c7bbde6d3b02764b712a2921f;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/cl_object.c b/lustre/obdclass/cl_object.c index 9e65b3a..5ab8a92 100644 --- a/lustre/obdclass/cl_object.c +++ b/lustre/obdclass/cl_object.c @@ -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. @@ -28,6 +26,8 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2011, 2012, Whamcloud, Inc. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -50,9 +50,6 @@ */ #define DEBUG_SUBSYSTEM S_CLASS -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif #include /* class_put_type() */ @@ -76,8 +73,8 @@ static cfs_lock_class_key_t cl_lock_guard_class; /** Lock class of cl_object_header::coh_attr_guard */ static cfs_lock_class_key_t cl_attr_guard_class; -static __u32 cl_ctx_tags; -static __u32 cl_ses_tags; +extern __u32 lu_context_tags_default; +extern __u32 lu_session_tags_default; /** * Initialize cl_object_header. */ @@ -543,7 +540,7 @@ static CFS_LIST_HEAD(cl_envs); static unsigned cl_envs_cached_nr = 0; static unsigned cl_envs_cached_max = 128; /* XXX: prototype: arbitrary limit * for now. */ -static cfs_spinlock_t cl_envs_guard = CFS_SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(cl_envs_guard); struct cl_env { void *ce_magic; @@ -795,18 +792,6 @@ static void cl_env_fini(struct cl_env *cle) OBD_SLAB_FREE_PTR(cle, cl_env_kmem); } -void cl_set_ctx_tags(__u32 tags) -{ - cl_ctx_tags = tags; -} -EXPORT_SYMBOL(cl_set_ctx_tags); - -void cl_set_ses_tags(__u32 tags) -{ - cl_ses_tags = tags; -} -EXPORT_SYMBOL(cl_set_ses_tags); - static struct lu_env *cl_env_obtain(void *debug) { struct cl_env *cle; @@ -835,7 +820,8 @@ static struct lu_env *cl_env_obtain(void *debug) } } else { cfs_spin_unlock(&cl_envs_guard); - env = cl_env_new(cl_ctx_tags, cl_ses_tags, debug); + env = cl_env_new(lu_context_tags_default, + lu_session_tags_default, debug); } RETURN(env); }