-/* -*- 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.
/*
* 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/
*/
#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#include <libcfs/libcfs.h>
/* class_put_type() */
/** 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.
*/
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;
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;
}
} 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);
}