Fix the build which was broken since the following commit:
commit
0a259bd7dbac76d75b89a389bc317720153aa452
Author: Jinshan Xiong <jinshan.xiong@intel.com>
Date: Mon Sep 30 15:00:38 2013 -0700
LU-3321 clio: collapse layer of cl_page
Move radix tree to osc layer to for performance improvement.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I93e3cb8352f7be41c23465b12945874316aa1809
Reviewed-on: http://review.whamcloud.com/7892
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie8543513852d98d0aa82bca0f227d286cdf8ebd2
Reviewed-on: http://review.whamcloud.com/8853
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LASSERT(lock->cll_state != CLS_FREEING);
ENTRY;
LASSERT(lock->cll_state != CLS_FREEING);
ENTRY;
- cl_lock_hold_mod(env, lock, +1);
+ cl_lock_hold_mod(env, lock, +1);
lu_ref_add(&lock->cll_holders, scope, source);
lu_ref_add(&lock->cll_reference, scope, source);
EXIT;
lu_ref_add(&lock->cll_holders, scope, source);
lu_ref_add(&lock->cll_reference, scope, source);
EXIT;
#include "osc_cl_internal.h"
#include "osc_cl_internal.h"
-/** \addtogroup osc
- * @{
+/** \addtogroup osc
+ * @{
*/
/*****************************************************************************
*/
/*****************************************************************************
static const struct cl_lock_operations osc_lock_lockless_ops;
static void osc_lock_to_lockless(const struct lu_env *env,
struct osc_lock *ols, int force);
static const struct cl_lock_operations osc_lock_lockless_ops;
static void osc_lock_to_lockless(const struct lu_env *env,
struct osc_lock *ols, int force);
-static int osc_lock_has_pages(struct osc_lock *olck);
+static bool osc_lock_has_pages(struct osc_lock *olck);
int osc_lock_is_lockless(const struct osc_lock *olck)
{
int osc_lock_is_lockless(const struct osc_lock *olck)
{
* Returns true iff there are pages under \a olck not protected by other
* locks.
*/
* Returns true iff there are pages under \a olck not protected by other
* locks.
*/
-static int osc_lock_has_pages(struct osc_lock *olck)
+static bool osc_lock_has_pages(struct osc_lock *olck)
{
struct cl_lock *lock;
struct cl_lock_descr *descr;
{
struct cl_lock *lock;
struct cl_lock_descr *descr;
struct cl_env_nest nest;
struct cl_io *io;
struct lu_env *env;
struct cl_env_nest nest;
struct cl_io *io;
struct lu_env *env;
+ bool has_pages;
+ int rc;
- env = cl_env_nested_get(&nest);
- if (IS_ERR(env))
- return 0;
+ env = cl_env_nested_get(&nest);
+ if (IS_ERR(env))
+ return false;
obj = olck->ols_cl.cls_obj;
oob = cl2osc(obj);
obj = olck->ols_cl.cls_obj;
oob = cl2osc(obj);
descr = &lock->cll_descr;
mutex_lock(&oob->oo_debug_mutex);
descr = &lock->cll_descr;
mutex_lock(&oob->oo_debug_mutex);
-
- io->ci_obj = cl_object_top(obj);
+ io->ci_obj = cl_object_top(obj);
io->ci_ignore_layout = 1;
io->ci_ignore_layout = 1;
- cl_io_init(env, io, CIT_MISC, io->ci_obj);
+ rc = cl_io_init(env, io, CIT_MISC, io->ci_obj);
+ if (rc != 0)
+ GOTO(out, has_pages = false);
+
- result = osc_page_gang_lookup(env, oob, io,
- descr->cld_start, descr->cld_end,
- check_cb, (void *)lock);
- if (result == CLP_GANG_ABORT)
+ rc = osc_page_gang_lookup(env, io, oob,
+ descr->cld_start, descr->cld_end,
+ check_cb, (void *)lock);
+ if (rc == CLP_GANG_ABORT)
- if (result == CLP_GANG_RESCHED)
+ if (rc == CLP_GANG_RESCHED)
- } while (result != CLP_GANG_OKAY);
+ } while (rc != CLP_GANG_OKAY);
+ has_pages = (rc == CLP_GANG_ABORT);
+out:
cl_io_fini(env, io);
mutex_unlock(&oob->oo_debug_mutex);
cl_env_nested_put(&nest, env);
cl_io_fini(env, io);
mutex_unlock(&oob->oo_debug_mutex);
cl_env_nested_put(&nest, env);
- return (result == CLP_GANG_ABORT);
-static int osc_lock_has_pages(struct osc_lock *olck)
+static bool osc_lock_has_pages(struct osc_lock *olck)
}
#endif /* CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK */
}
#endif /* CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK */