Kevin,
Instead of the call to d_add(), can you replace it by a
pvfs2_d_splice_alias() with the same parameters as before and
recompile/reload and see if that fixes the crash.
Something like the attached..
thanks,
Murali
On 8/16/07, Kevin Harms <[EMAIL PROTECTED]> wrote:
> Murali,
>
> i tried the patch. (applied it to 2.6.3 source) it get crashes from
> on one of the machines.
> i send you an email with dmesg output.
>
> Kevin
>
Index: src/kernel/linux-2.6/dcache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/dcache.c,v
retrieving revision 1.31
diff -u -r1.31 dcache.c
--- src/kernel/linux-2.6/dcache.c 20 Sep 2006 22:59:53 -0000 1.31
+++ src/kernel/linux-2.6/dcache.c 16 Aug 2007 09:33:24 -0000
@@ -35,8 +35,14 @@
gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: parent not found.\n");
}
+ if (inode == NULL) {
+ return 1;
+ }
if (inode && parent_inode)
{
+ if (is_bad_inode(inode)) {
+ return 0;
+ }
/* first perform a lookup to make sure that the object not only
* exists, but is still in the expected place in the name space
*/
@@ -73,14 +79,30 @@
new_op, "pvfs2_lookup",
get_interruptible_flag(parent_inode));
- if((new_op->downcall.status != 0) ||
- !match_handle(new_op->downcall.resp.lookup.refn.handle, inode))
- {
- gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: lookup failure or no match.\n");
+ if ((new_op->downcall.status != 0)) {
+ gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: lookup failure.\n");
op_release(new_op);
- return(0);
+ return 0;
+ }
+ /* no match */
+ if (!match_handle(new_op->downcall.resp.lookup.refn.handle, inode))
+ {
+ struct inode *res_inode;
+
+ /* Find or allocate a new inode for this new handle */
+ res_inode = pvfs2_iget(parent_inode->i_sb, &new_op->downcall.resp.lookup.refn);
+ if (res_inode != NULL) {
+ /* associate with the given dentry */
+ pvfs2_d_splice_alias(dentry, res_inode);
+ gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: associated inode %llu)\n",
+ llu(get_handle_from_ino(res_inode)));
+ inode = res_inode;
+ } else {
+ gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_revalidate_common: lookup failure or no match.\n");
+ op_release(new_op);
+ return(0);
+ }
}
-
op_release(new_op);
}
else
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers