[prev in list] [next in list] [prev in thread] [next in thread]
List: lustre-cvs
Subject: [Lustre-cvs] CVS: lustre/llite dcache.c,1.25,1.25.2.1 namei.c,1.134,1.134.2.1 super.c,1.117,1.117.2.
From: Phil Schwan <pschwan () users ! sourceforge ! net>
Date: 2002-10-31 15:27:16
[Download RAW message or body]
Update of /cvsroot/lustre/lustre/llite
In directory usw-pr-cvs1:/tmp/cvs-serv19060/llite
Modified Files:
Tag: b_find_alias
dcache.c namei.c super.c
Log Message:
commit our test dcache changes to the new branch
Index: dcache.c
===================================================================
RCS file: /cvsroot/lustre/lustre/llite/dcache.c,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -w -b -B -p -r1.25 -r1.25.2.1
--- dcache.c 30 Oct 2002 20:38:26 -0000 1.25
+++ dcache.c 31 Oct 2002 15:27:14 -0000 1.25.2.1
@@ -71,6 +71,8 @@ void ll_intent_release(struct dentry *de
EXIT;
}
+extern struct dentry *ll_find_alias(struct inode *, struct dentry *);
+
int ll_revalidate2(struct dentry *de, int flags, struct lookup_intent *it)
{
int rc;
@@ -89,6 +91,12 @@ int ll_revalidate2(struct dentry *de, in
/* Something bad happened; overwrite it_status? */
CERROR("ll_intent_lock: %d\n", rc);
}
+ /* unfortunately ll_intent_lock may cause a callback and revoke our
+ dentry */
+ spin_lock(&dcache_lock);
+ list_del_init(&de->d_hash);
+ spin_unlock(&dcache_lock);
+ d_rehash(de);
if (it != NULL && it->it_status == 0) {
LL_SAVE_INTENT(de, it);
Index: namei.c
===================================================================
RCS file: /cvsroot/lustre/lustre/llite/namei.c,v
retrieving revision 1.134
retrieving revision 1.134.2.1
diff -u -w -b -B -p -r1.134 -r1.134.2.1
--- namei.c 30 Oct 2002 20:38:27 -0000 1.134
+++ namei.c 31 Oct 2002 15:27:14 -0000 1.134.2.1
@@ -156,7 +156,7 @@ static int ll_intent_to_lock_mode(struct
} else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_UNLINK |
IT_RMDIR | IT_RENAME | IT_RENAME2 | IT_READLINK|
IT_LINK | IT_LINK2 | IT_LOOKUP | IT_SYMLINK)) {
- return LCK_PW;
+ return LCK_PR;
}
LBUG();
@@ -347,7 +347,7 @@ int ll_intent_lock(struct inode *parent,
/* Search "inode"'s alias list for a dentry that has the same name and parent as
* de. If found, return it. If not found, return de. */
-static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
+struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
{
struct list_head *tmp;
@@ -369,11 +369,16 @@ static struct dentry *ll_find_alias(stru
de->d_name.len) != 0)
continue;
+ list_del_init(&dentry->d_hash);
+
spin_unlock(&dcache_lock);
d_rehash(dentry);
- return dget(dentry);
+ atomic_inc(&dentry->d_count);
+ return dentry;
}
+
spin_unlock(&dcache_lock);
+
return de;
}
Index: super.c
===================================================================
RCS file: /cvsroot/lustre/lustre/llite/super.c,v
retrieving revision 1.117
retrieving revision 1.117.2.1
diff -u -w -b -B -p -r1.117 -r1.117.2.1
--- super.c 31 Oct 2002 07:39:18 -0000 1.117
+++ super.c 31 Oct 2002 15:27:14 -0000 1.117.2.1
@@ -119,6 +119,7 @@ static struct super_block * ll_read_supe
}
INIT_LIST_HEAD(&sbi->ll_conn_chain);
+ INIT_LIST_HEAD(&sbi->ll_orphan_dentry_list);
generate_random_uuid(uuid);
class_uuid_unparse(uuid, sbi->ll_sb_uuid);
@@ -243,6 +244,7 @@ out_free:
static void ll_put_super(struct super_block *sb)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
+ struct list_head *tmp, *next;
struct ll_fid rootfid;
ENTRY;
@@ -259,6 +261,14 @@ static void ll_put_super(struct super_bl
mdc_getstatus(&sbi->ll_mdc_conn, &rootfid);
obd_disconnect(&sbi->ll_mdc_conn);
+
+ spin_lock(&dcache_lock);
+ list_for_each_safe(tmp, next, &sbi->ll_orphan_dentry_list) {
+ struct dentry *dentry = list_entry(tmp, struct dentry, d_hash);
+ shrink_dcache_parent(dentry);
+ }
+ spin_unlock(&dcache_lock);
+
OBD_FREE(sbi, sizeof(*sbi));
MOD_DEC_USE_COUNT;
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
Lustre-cvs mailing list
Lustre-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lustre-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic