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-354 test: Change dev_set_rdonly() check to warning
[fs/lustre-release.git]
/
lustre
/
mdt
/
mdt_handler.c
diff --git
a/lustre/mdt/mdt_handler.c
b/lustre/mdt/mdt_handler.c
index
9a71be0
..
55ab803
100644
(file)
--- a/
lustre/mdt/mdt_handler.c
+++ b/
lustre/mdt/mdt_handler.c
@@
-28,9
+28,8
@@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
- */
-/*
- * Copyright (c) 2011 Whamcloud, Inc.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-816,6
+815,7
@@
static int mdt_raw_lookup(struct mdt_thread_info *info,
LASSERT(!info->mti_cross_ref);
/* Only got the fid of this obj by name */
LASSERT(!info->mti_cross_ref);
/* Only got the fid of this obj by name */
+ fid_zero(child_fid);
rc = mdo_lookup(info->mti_env, next, lname, child_fid,
&info->mti_spec);
#if 0
rc = mdo_lookup(info->mti_env, next, lname, child_fid,
&info->mti_spec);
#if 0
@@
-980,6
+980,7
@@
static int mdt_getattr_name_lock(struct mdt_thread_info *info,
}
/* step 2: lookup child's fid by name */
}
/* step 2: lookup child's fid by name */
+ fid_zero(child_fid);
rc = mdo_lookup(info->mti_env, next, lname, child_fid,
&info->mti_spec);
rc = mdo_lookup(info->mti_env, next, lname, child_fid,
&info->mti_spec);
@@
-1039,7
+1040,7
@@
relock:
mdt_lock_reg_init(lhc, LCK_PR);
if (mdt_object_exists(child) == 0) {
mdt_lock_reg_init(lhc, LCK_PR);
if (mdt_object_exists(child) == 0) {
- LU_OBJECT_DEBUG(D_
WARNING
, info->mti_env,
+ LU_OBJECT_DEBUG(D_
INODE
, info->mti_env,
&child->mot_obj.mo_lu,
"Object doesn't exist!\n");
GOTO(out_child, rc = -ENOENT);
&child->mot_obj.mo_lu,
"Object doesn't exist!\n");
GOTO(out_child, rc = -ENOENT);
@@
-4822,8
+4823,8
@@
static struct lu_object *mdt_object_alloc(const struct lu_env *env,
lu_object_init(o, h, d);
lu_object_add_top(h, o);
o->lo_ops = &mdt_obj_ops;
lu_object_init(o, h, d);
lu_object_add_top(h, o);
o->lo_ops = &mdt_obj_ops;
- cfs_
sema_init(&mo->mot_ioepoch_sem, 1
);
- cfs_
sema_init(&mo->mot_lov_sem, 1
);
+ cfs_
mutex_init(&mo->mot_ioepoch_mutex
);
+ cfs_
mutex_init(&mo->mot_lov_mutex
);
RETURN(o);
} else
RETURN(NULL);
RETURN(o);
} else
RETURN(NULL);
@@
-5228,7
+5229,7
@@
static int mdt_init_export(struct obd_export *exp)
CFS_INIT_LIST_HEAD(&med->med_open_head);
cfs_spin_lock_init(&med->med_open_lock);
CFS_INIT_LIST_HEAD(&med->med_open_head);
cfs_spin_lock_init(&med->med_open_lock);
- cfs_
sema_init(&med->med_idmap_sem, 1
);
+ cfs_
mutex_init(&med->med_idmap_mutex
);
med->med_idmap = NULL;
cfs_spin_lock(&exp->exp_lock);
exp->exp_connecting = 1;
med->med_idmap = NULL;
cfs_spin_lock(&exp->exp_lock);
exp->exp_connecting = 1;
@@
-5553,7
+5554,7
@@
static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
rc = mdt_device_sync(&env, mdt);
break;
case OBD_IOC_SET_READONLY:
rc = mdt_device_sync(&env, mdt);
break;
case OBD_IOC_SET_READONLY:
- dt->dd_ops->dt_ro(&env, dt);
+
rc =
dt->dd_ops->dt_ro(&env, dt);
break;
case OBD_IOC_ABORT_RECOVERY:
CERROR("Aborting recovery for device %s\n", obd->obd_name);
break;
case OBD_IOC_ABORT_RECOVERY:
CERROR("Aborting recovery for device %s\n", obd->obd_name);