Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-3470 llog: fix return value of llog_alloc_handle
[fs/lustre-release.git]
/
lustre
/
lclient
/
lcommon_misc.c
diff --git
a/lustre/lclient/lcommon_misc.c
b/lustre/lclient/lcommon_misc.c
index
ee4fef3
..
26cfa04
100644
(file)
--- a/
lustre/lclient/lcommon_misc.c
+++ b/
lustre/lclient/lcommon_misc.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.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-26,8
+24,10
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright
2008 Sun Microsystems, Inc.
All rights reserved.
+ * Copyright
(c) 2008, 2010, Oracle and/or its affiliates.
All rights reserved.
* Use is subject to license terms.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-56,10
+56,10
@@
int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
__u32 valsize = sizeof(struct lov_desc);
int rc, easize, def_easize, cookiesize;
struct lov_desc desc;
__u32 valsize = sizeof(struct lov_desc);
int rc, easize, def_easize, cookiesize;
struct lov_desc desc;
- __u
32
stripes;
+ __u
16
stripes;
ENTRY;
ENTRY;
- rc = obd_get_info(dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC,
+ rc = obd_get_info(
NULL,
dt_exp, sizeof(KEY_LOVDESC), KEY_LOVDESC,
&valsize, &desc, NULL);
if (rc)
RETURN(rc);
&valsize, &desc, NULL);
if (rc)
RETURN(rc);
@@
-102,13
+102,13
@@
int cl_ocd_update(struct obd_device *host,
flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n",
lco->lco_flags, flags);
flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n",
lco->lco_flags, flags);
-
mutex_down
(&lco->lco_lock);
+
mutex_lock
(&lco->lco_lock);
lco->lco_flags &= flags;
/* for each osc event update ea size */
if (lco->lco_dt_exp)
cl_init_ea_size(lco->lco_md_exp, lco->lco_dt_exp);
lco->lco_flags &= flags;
/* for each osc event update ea size */
if (lco->lco_dt_exp)
cl_init_ea_size(lco->lco_md_exp, lco->lco_dt_exp);
-
mutex_up
(&lco->lco_lock);
+
mutex_unlock
(&lco->lco_lock);
result = 0;
} else {
CERROR("unexpected notification from %s %s!\n",
result = 0;
} else {
CERROR("unexpected notification from %s %s!\n",
@@
-136,8
+136,9
@@
int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
if (IS_ERR(env))
return PTR_ERR(env);
if (IS_ERR(env))
return PTR_ERR(env);
- io =
&ccc_env_info(env)->cti_io
;
+ io =
ccc_env_thread_io(env)
;
io->ci_obj = obj;
io->ci_obj = obj;
+ io->ci_ignore_layout = 1;
rc = cl_io_init(env, io, CIT_MISC, io->ci_obj);
if (rc) {
rc = cl_io_init(env, io, CIT_MISC, io->ci_obj);
if (rc) {
@@
-163,9
+164,10
@@
int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
return PTR_ERR(lock);
}
return PTR_ERR(lock);
}
- cg->cg_env = cl_env_get(&refcheck);
+ cg->cg_env = cl_env_get(&refcheck);
+ cg->cg_io = io;
cg->cg_lock = lock;
cg->cg_lock = lock;
- cg->cg_gid = gid;
+ cg->cg_gid
= gid;
LASSERT(cg->cg_env == env);
cl_env_unplant(env, &refcheck);
LASSERT(cg->cg_env == env);
cl_env_unplant(env, &refcheck);
@@
-174,9
+176,10
@@
int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
void cl_put_grouplock(struct ccc_grouplock *cg)
{
void cl_put_grouplock(struct ccc_grouplock *cg)
{
- struct lu_env *env = cg->cg_env;
- struct cl_lock *lock = cg->cg_lock;
- int refcheck;
+ struct lu_env *env = cg->cg_env;
+ struct cl_io *io = cg->cg_io;
+ struct cl_lock *lock = cg->cg_lock;
+ int refcheck;
LASSERT(cg->cg_env);
LASSERT(cg->cg_gid);
LASSERT(cg->cg_env);
LASSERT(cg->cg_gid);
@@
-186,7
+189,7
@@
void cl_put_grouplock(struct ccc_grouplock *cg)
cl_unuse(env, lock);
cl_lock_release(env, lock, GROUPLOCK_SCOPE, cfs_current());
cl_unuse(env, lock);
cl_lock_release(env, lock, GROUPLOCK_SCOPE, cfs_current());
- cl_io_fini(env,
&ccc_env_info(env)->cti_
io);
+ cl_io_fini(env, io);
cl_env_put(env, NULL);
}
cl_env_put(env, NULL);
}