source: trunk/server/common/patches/openafs-revert-d_drop-new-file.patch @ 2634

Last change on this file since 2634 was 2634, checked in by andersk, 8 years ago
openafs: Update force_drop patch to log more information requested by upstream
File size: 1.6 KB
  • src/afs/LINUX/osi_vnodeops.c

    From 88f51eecfc5a5edb92b252b202c24e54298fe129 Mon Sep 17 00:00:00 2001
    From: Anders Kaseorg <andersk@mit.edu>
    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 b afs_linux_dentry_revalidate(struct dentry *dp, int flags) 
    12531253                     * we don't know if the name points to this file or not. */
    12541254                    force_drop = 0;
    12551255                }
     1256                if (force_drop && tvc && tvc != vcp &&
     1257                    !(dp->d_inode && S_ISREG(dp->d_inode->i_mode))) {
     1258                    /* workaround and logging for GCO RT 131780 */
     1259                    char buf[256];
     1260                    char *path = dentry_path_raw(dp, buf, sizeof(buf));
     1261                    afs_warn("afs: RT 131780: got back a different vcache for /afs%s: "
     1262                             "vcp: %u.%u.%u mvstat %d, tvc: %u.%u.%u mvstat %d\n",
     1263                             IS_ERR(path) ? "/(bad path)" : path,
     1264                             (unsigned)vcp->f.fid.Fid.Volume,
     1265                             (unsigned)vcp->f.fid.Fid.Vnode,
     1266                             (unsigned)vcp->f.fid.Fid.Unique,
     1267                             (int)vcp->mvstat,
     1268                             (unsigned)tvc->f.fid.Fid.Volume,
     1269                             (unsigned)tvc->f.fid.Fid.Vnode,
     1270                             (unsigned)tvc->f.fid.Fid.Unique,
     1271                             (int)tvc->mvstat);
     1272                    force_drop = 0;
     1273                }
    12561274                goto bad_dentry;
    12571275            }
    12581276
Note: See TracBrowser for help on using the repository browser.