[OpenAFS-devel] reproducible problem during cache flush
chas williams
chas@cmf.nrl.navy.mil
Tue, 30 Jul 2002 14:15:22 -0400
>if we remove the AFS_VM_RDWR_ENV from particular places in afs_vnop_read.c
>we should get prefetch on linux as well?
something like the following:
Index: src/afs/VNOPS/afs_vnop_read.c
===================================================================
RCS file: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v
retrieving revision 1.5.4.1
diff -u -d -b -w -r1.5.4.1 afs_vnop_read.c
--- src/afs/VNOPS/afs_vnop_read.c 2002/07/10 20:04:36 1.5.4.1
+++ src/afs/VNOPS/afs_vnop_read.c 2002/07/30 18:13:50
@@ -263,7 +263,7 @@
* to it in case we need to do a prefetch.
*/
if (tdc) {
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
/* try to queue prefetch, if needed */
if (!(tdc->flags & DFNextStarted) && !noLock) {
afs_PrefetchChunk(avc, tdc, acred, &treq);
@@ -446,7 +446,7 @@
hadd32(afs_indexCounter, 1);
if (!noLock) {
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
if (!(code = afs_InitReq(&treq, acred))&& (!(tdc->flags & DFNextStarted)))
afs_PrefetchChunk(avc, tdc, acred, &treq);
#endif
Index: src/afs/VNOPS/afs_vnop_write.c
===================================================================
RCS file: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v
retrieving revision 1.8.2.7
diff -u -d -b -w -r1.8.2.7 afs_vnop_write.c
--- src/afs/VNOPS/afs_vnop_write.c 2002/07/22 23:14:54 1.8.2.7
+++ src/afs/VNOPS/afs_vnop_write.c 2002/07/30 18:13:50
@@ -283,7 +283,7 @@
if (filePos > avc->m.Length)
avc->m.Length = filePos;
#endif
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.
@@ -580,7 +580,7 @@
}
#endif
osi_UFSClose(tfile);
-#ifndef AFS_VM_RDWR_ENV
+#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_LINUX22_ENV)
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.