From 88f51eecfc5a5edb92b252b202c24e54298fe129 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 12 Oct 2014 22:21:40 -0400 Subject: [PATCH] Revert "LINUX: Drop dentry if lookup returns new file" and log differences This effectively reverts commit 81f1814b566cb3b1cda97be4c48b9788cd7addd0, and adds a warning message whenever it would have taken effect. Change-Id: If470195b1eeb23d33693ade8d6fc79e903663529 --- src/afs/LINUX/osi_vnodeops.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 2a8253e..e22f62a 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1253,6 +1253,24 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags) * we don't know if the name points to this file or not. */ force_drop = 0; } + if (force_drop && tvc && tvc != vcp && + !(dp->d_inode && S_ISREG(dp->d_inode->i_mode))) { + /* workaround and logging for GCO RT 131780 */ + char buf[256]; + char *path = dentry_path_raw(dp, buf, sizeof(buf)); + afs_warn("afs: RT 131780: got back a different vcache for /afs%s: " + "vcp: %u.%u.%u mvstat %d, tvc: %u.%u.%u mvstat %d\n", + IS_ERR(path) ? "/(bad path)" : path, + (unsigned)vcp->f.fid.Fid.Volume, + (unsigned)vcp->f.fid.Fid.Vnode, + (unsigned)vcp->f.fid.Fid.Unique, + (int)vcp->mvstat, + (unsigned)tvc->f.fid.Fid.Volume, + (unsigned)tvc->f.fid.Fid.Vnode, + (unsigned)tvc->f.fid.Fid.Unique, + (int)tvc->mvstat); + force_drop = 0; + } goto bad_dentry; } -- 2.1.2