[Linux-cachefs] Kernel dump with 2.6.30 , 2.6.30.1, 2.6.30.2, 2.6.30.3

David Howells dhowells at redhat.com
Mon Jul 27 13:01:54 UTC 2009


Duc Le Minh <duclm.vn at gmail.com> wrote:

> CacheFiles: Error: Unexpected object collision
> xobject: OBJ7
> xobjstate=OBJECT_ACTIVE
> xobjflags=0
> xobjevent=4 [fffffffffffffffb]
> xops=0 inp=0 exc=0
> xcookie=ffff8802048c53d8 [pr=ffff8802048c5108 nd=ffff880204153bf8 fl=8]
> xparent=ffff8802080431c0
> object: OBJ1ef
> cookie=ffff880086189618 [pr=ffff8802048c5108 nd=ffff880196371428 fl=7]
> parent=ffff8802080431c0

That's really odd.  The netfs_data for both cookies is different, indicating
different NFS inodes, yet they seem to have the same NFS file handle - which
doesn't seem very likely.

Has this BUG() shown up much for you?

Can you try applying the attached patch?  That should hopefully print the keys
of the offending inodes.

David
---
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
index 4ce818a..3986db0 100644
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -73,6 +73,9 @@ try_again:
 	 * need to wait for it to be destroyed */
 wait_for_old_object:
 	if (xobject->fscache.state < FSCACHE_OBJECT_DYING) {
+		unsigned keylen;
+		u8 *keybuf;
+
 		printk(KERN_ERR "\n");
 		printk(KERN_ERR "CacheFiles: Error:"
 		       " Unexpected object collision\n");
@@ -102,6 +105,31 @@ wait_for_old_object:
 		       object->fscache.cookie->flags);
 		printk(KERN_ERR "parent=%p\n",
 		       object->fscache.parent);
+
+		keybuf = kmalloc(512, GFP_NOIO);
+		if (keybuf) {
+			struct fscache_cookie *cookie;
+			unsigned loop;
+
+			cookie = object->fscache.cookie;
+			keylen = cookie->def->get_key(cookie->netfs_data,
+						      keybuf, 512);
+			printk(KERN_ERR "okey=[%u] '", keylen);
+			for (loop = 0; loop < keylen; loop++)
+				printk("%02x", keybuf[loop]);
+			printk("'\n");
+
+			cookie = xobject->fscache.cookie;
+			keylen = cookie->def->get_key(cookie->netfs_data,
+						      keybuf, 512);
+			printk(KERN_ERR "xkey=[%u] '", keylen);
+			for (loop = 0; loop < keylen; loop++)
+				printk("%02x", keybuf[loop]);
+			printk("'\n");
+
+			kfree(keybuf);
+		}
+
 		BUG();
 	}
 	atomic_inc(&xobject->usage);




More information about the Linux-cachefs mailing list