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:  [EMAIL PROTECTED]
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216
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)++;
        }

Reply via email to