Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72da2dc
)
- couple minor optimizations
author
alex
<alex>
Sun, 7 Aug 2005 14:23:39 +0000
(14:23 +0000)
committer
alex
<alex>
Sun, 7 Aug 2005 14:23:39 +0000
(14:23 +0000)
lustre/mds/mds_lmv.c
patch
|
blob
|
history
lustre/mds/mds_open.c
patch
|
blob
|
history
diff --git
a/lustre/mds/mds_lmv.c
b/lustre/mds/mds_lmv.c
index
e96929c
..
f40db1c
100644
(file)
--- a/
lustre/mds/mds_lmv.c
+++ b/
lustre/mds/mds_lmv.c
@@
-643,7
+643,7
@@
int mds_try_to_split_dir(struct obd_device *obd, struct dentry *dentry,
struct obdo *oa = NULL;
int rc, mea_size = 0;
struct lustre_id id;
struct obdo *oa = NULL;
int rc, mea_size = 0;
struct lustre_id id;
- void *handle;
+
void *handle;
ENTRY;
if (update_mode != LCK_EX)
ENTRY;
if (update_mode != LCK_EX)
@@
-706,9
+706,8
@@
int mds_try_to_split_dir(struct obd_device *obd, struct dentry *dentry,
*/
oa->o_id = dir->i_ino;
*/
oa->o_id = dir->i_ino;
- down(&dir->i_sem);
+ /* get parent id: ldlm lock on the parent protects ea */
rc = mds_read_inode_sid(obd, dir, &id);
rc = mds_read_inode_sid(obd, dir, &id);
- up(&dir->i_sem);
if (rc) {
CERROR("Can't read inode self id, inode %lu, "
"rc %d.\n", dir->i_ino, rc);
if (rc) {
CERROR("Can't read inode self id, inode %lu, "
"rc %d.\n", dir->i_ino, rc);
diff --git
a/lustre/mds/mds_open.c
b/lustre/mds/mds_open.c
index
355577c
..
f49a66a
100644
(file)
--- a/
lustre/mds/mds_open.c
+++ b/
lustre/mds/mds_open.c
@@
-1024,14
+1024,6
@@
restart:
cleanup_phase = 1; /* parent dentry and lock */
cleanup_phase = 1; /* parent dentry and lock */
- /* get parent id: ldlm lock on the parent protects ea */
- rc = mds_read_inode_sid(obd, dparent->d_inode, &sid);
- if (rc) {
- CERROR("can't read parent inode id. ino(%lu) rc(%d)\n",
- dparent->d_inode->i_ino, rc);
- GOTO(cleanup, rc);
- }
-
/* try to retrieve MEA data for this dir */
rc = mds_md_get_attr(obd, dparent->d_inode, &mea, &mea_size);
if (rc)
/* try to retrieve MEA data for this dir */
rc = mds_md_get_attr(obd, dparent->d_inode, &mea, &mea_size);
if (rc)
@@
-1135,6
+1127,14
@@
got_child:
struct iattr iattr;
struct inode *inode;
struct iattr iattr;
struct inode *inode;
+ /* get parent id: ldlm lock on the parent protects ea */
+ rc = mds_read_inode_sid(obd, dparent->d_inode, &sid);
+ if (rc) {
+ CERROR("can't read parent inode id. ino(%lu) rc(%d)\n",
+ dparent->d_inode->i_ino, rc);
+ GOTO(cleanup, rc);
+ }
+
ino = (unsigned long)id_ino(rec->ur_id2);
rc = mds_try_to_split_dir(obd, dparent, &mea, 0,
ino = (unsigned long)id_ino(rec->ur_id2);
rc = mds_try_to_split_dir(obd, dparent, &mea, 0,