[OpenAFS-devel] stopgap patch to make reiserfs+afsd issue less noticable

Nathan Neulinger nneul@umr.edu
Wed, 11 Apr 2001 10:24:27 -0500


--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This has an inherent race condition with the kernel inode cache being 
flushed, so most definately is not perfect, but it should have no impact on
ext2 based caches so shouldn't hurt anything.

I'd eventually like to see a real solution like what the reiserfs guys 
talked about. 

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216

--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="afsd-reiserfs.diff"

Index: afsd/afsd.c
===================================================================
RCS file: /cvs/openafs/src/afsd/afsd.c,v
retrieving revision 1.6
diff -u -r1.6 afsd.c
--- afsd/afsd.c	2001/03/27 07:06:42	1.6
+++ afsd/afsd.c	2001/04/11 15:18:20
@@ -584,6 +584,19 @@
 	     * Found a valid data cache filename.  Remember this file's inode and bump
 	     * the number of files found.
 	     */
+
+#ifdef AFS_LINUX24_ENV
+	    /* Stat the file, to bring the inode into the kernel cache
+	     * needed to avoid iget failure on reiserfs
+	     * Note - this is stopgap, and won't prevent all failures, but 
+	     * does make the problem a lot less noticable. 
+	     */
+
+	    struct stat sb;
+	    sprintf(fileToDelete, "%s", currp->d_name);
+	    stat (fullpn_FileToDelete, &sb);
+#endif
+
 	    inode_for_V[vFileNum] = currp->d_ino;
 	    (*vFilesFound)++;
 	}

--SLDf9lqlvOQaIe6s--