| [2634] | 1 | From 88f51eecfc5a5edb92b252b202c24e54298fe129 Mon Sep 17 00:00:00 2001 | 
|---|
| [2633] | 2 | From: Anders Kaseorg <andersk@mit.edu> | 
|---|
|  | 3 | Date: Sun, 12 Oct 2014 22:21:40 -0400 | 
|---|
|  | 4 | Subject: [PATCH] Revert "LINUX: Drop dentry if lookup returns new file" and | 
|---|
|  | 5 | log differences | 
|---|
|  | 6 |  | 
|---|
| [2634] | 7 | This effectively reverts commit | 
|---|
|  | 8 | 81f1814b566cb3b1cda97be4c48b9788cd7addd0, and adds a warning message | 
|---|
|  | 9 | whenever it would have taken effect. | 
|---|
| [2633] | 10 |  | 
|---|
| [2634] | 11 | Change-Id: If470195b1eeb23d33693ade8d6fc79e903663529 | 
|---|
| [2633] | 12 | --- | 
|---|
| [2634] | 13 | src/afs/LINUX/osi_vnodeops.c | 18 ++++++++++++++++++ | 
|---|
|  | 14 | 1 file changed, 18 insertions(+) | 
|---|
| [2633] | 15 |  | 
|---|
|  | 16 | diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c | 
|---|
| [2634] | 17 | index 2a8253e..e22f62a 100644 | 
|---|
| [2633] | 18 | --- a/src/afs/LINUX/osi_vnodeops.c | 
|---|
|  | 19 | +++ b/src/afs/LINUX/osi_vnodeops.c | 
|---|
| [2634] | 20 | @@ -1253,6 +1253,24 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags) | 
|---|
|  | 21 | * we don't know if the name points to this file or not. */ | 
|---|
|  | 22 | force_drop = 0; | 
|---|
| [2633] | 23 | } | 
|---|
| [2634] | 24 | +               if (force_drop && tvc && tvc != vcp && | 
|---|
|  | 25 | +                   !(dp->d_inode && S_ISREG(dp->d_inode->i_mode))) { | 
|---|
|  | 26 | +                   /* workaround and logging for GCO RT 131780 */ | 
|---|
|  | 27 | +                   char buf[256]; | 
|---|
|  | 28 | +                   char *path = dentry_path_raw(dp, buf, sizeof(buf)); | 
|---|
|  | 29 | +                   afs_warn("afs: RT 131780: got back a different vcache for /afs%s: " | 
|---|
|  | 30 | +                            "vcp: %u.%u.%u mvstat %d, tvc: %u.%u.%u mvstat %d\n", | 
|---|
|  | 31 | +                            IS_ERR(path) ? "/(bad path)" : path, | 
|---|
|  | 32 | +                            (unsigned)vcp->f.fid.Fid.Volume, | 
|---|
|  | 33 | +                            (unsigned)vcp->f.fid.Fid.Vnode, | 
|---|
|  | 34 | +                            (unsigned)vcp->f.fid.Fid.Unique, | 
|---|
|  | 35 | +                            (int)vcp->mvstat, | 
|---|
|  | 36 | +                            (unsigned)tvc->f.fid.Fid.Volume, | 
|---|
|  | 37 | +                            (unsigned)tvc->f.fid.Fid.Vnode, | 
|---|
|  | 38 | +                            (unsigned)tvc->f.fid.Fid.Unique, | 
|---|
|  | 39 | +                            (int)tvc->mvstat); | 
|---|
|  | 40 | +                   force_drop = 0; | 
|---|
|  | 41 | +               } | 
|---|
| [2633] | 42 | goto bad_dentry; | 
|---|
|  | 43 | } | 
|---|
|  | 44 |  | 
|---|
|  | 45 | -- | 
|---|
|  | 46 | 2.1.2 | 
|---|
|  | 47 |  | 
|---|