My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 859: Gerrit mis-cherry-picks commits with --use-content-merge
4 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by andersk@mit.edu, Feb 25, 2011
Affected Version: 2.1.6.1

See http://gerrit.openafs.org/3999 .  The change fe8d833e that was cherry-picked by Gerrit does not match the change fb3b1892 that was submitted.  Here’s the diff to src/afs/LINUX/osi_vnodeops.c that got corrupted:

Submitted (fb3b1892):

@@ -1384,9 +1384,18 @@ afs_linux_rename(struct inode *oldip, struct dentry *olddp,
 #endif
 
 #if defined(AFS_LINUX24_ENV)
+#if defined(D_COUNT_INT)
+    spin_lock(&olddp->d_lock);
+    if (olddp->d_count > 1) {
+	spin_unlock(&olddp->d_lock);
+	shrink_dcache_parent(olddp);
+    } else
+	spin_unlock(&olddp->d_lock);
+#else
     if (atomic_read(&olddp->d_count) > 1)
 	shrink_dcache_parent(olddp);
 #endif
+#endif
 
     AFS_GLOCK();
     code = afs_rename(VTOAFS(oldip), oldname, VTOAFS(newip), newname, credp);

Cherry-picked (fe8d833e):

@@ -1396,10 +1396,19 @@ afs_linux_rename(struct inode *oldip, struct dentry *olddp,
 #endif
 
 #if defined(AFS_LINUX24_ENV)
+#if defined(D_COUNT_INT)
+    spin_lock(&olddp->d_lock);
+    if (olddp->d_count > 1) {
+	spin_unlock(&olddp->d_lock);
+	shrink_dcache_parent(olddp);
+    } else
+	spin_unlock(&olddp->d_lock);
+#else
     if (atomic_read(&olddp->d_count) > 1)
 	shrink_dcache_parent(olddp);
 #endif
 
+
     AFS_GLOCK();
     code = afs_rename(VTOAFS(oldip), oldname, VTOAFS(newip), newname, credp);
     AFS_GUNLOCK();

The only differences between the corresponding parents (fb3b1892^, fe8d833e^) in this file are at least 50 lines away.
Feb 25, 2011
#1 andersk@mit.edu
Gerrit also displays the patch incorrectly in both the “Side-by-Side” and “Unified” views.
Mar 1, 2011
#2 darksk...@gmail.com
I have had similar issues, I am wondering if it was related to the fact I had files in the repository i imported with CRLF line endings. Changes to these files are displaying wrongly.
Mar 1, 2011
#3 andersk@mit.edu
In my case, none of the four copies of this file (fb3b1892^, fb3b1892, fe8d833e^, fe8d833e) contain \r, nor any control characters other than \n and \t.
Sign in to add a comment

Powered by Google Project Hosting