[OpenAFS] Re: [OpenAFS-devel] Re: OpenAFS bug, Cache gets full
and is not flushed (fwd)
Derrick J Brashear
shadow@dementia.org
Sun, 16 Sep 2001 00:21:16 -0400 (EDT)
On Sun, 16 Sep 2001, Holger Brueckner wrote:
> > The patch solved the problem... I used 'fs setcachesize 180000' and copied
> > the file (640Mb) without any problems at all. I monitored the disk
> activity
> > by using "df" and the cache was being "emptied" when it reached the
> ceiling
> > of 180000 blocks.
>
> is this only for smp machines ? and is the patch available somewhere ??
any linux machine. an update release is being prepared.
this fixed a problem where you could e.g. run pine with an afs homedir,
make a volume go over-quota, and the write to write out .pinerc if you
then quit pine would loop. obviously n alternate fix is being looked for.
Index: src/afs/LINUX/osi_vnodeops.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v
retrieving revision 1.29
retrieving revision 1.28
diff -u -r1.29 -r1.28
--- src/afs/LINUX/osi_vnodeops.c 2001/08/29 00:46:57 1.29
+++ src/afs/LINUX/osi_vnodeops.c 2001/07/12 19:58:21 1.28
@@ -23,7 +23,7 @@
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.29 2001/08/29 00:46:57 shadow Exp $");
+RCSID("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.28 2001/07/12 19:58:21 shadow Exp $");
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
@@ -134,6 +134,10 @@
ObtainWriteLock(&vcp->lock, 530);
vcp->m.Date = osi_Time(); /* set modification time */
afs_FakeClose(vcp, credp);
+ if (code>=0)
+ code2 = afs_DoPartialWrite(vcp, &treq);
+ if (code2 && code >=0)
+ code = (ssize_t) -code2;
ReleaseWriteLock(&vcp->lock);
afs_Trace4(afs_iclSetp, CM_TRACE_WRITEOP, ICL_TYPE_POINTER, vcp,
Index: src/afs/VNOPS/afs_vnop_write.c
===================================================================
RCS file: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v
retrieving revision 1.8
retrieving revision 1.7
diff -u -r1.8 -r1.7
--- src/afs/VNOPS/afs_vnop_write.c 2001/08/29 00:47:00 1.8
+++ src/afs/VNOPS/afs_vnop_write.c 2001/07/12 19:58:22 1.7
@@ -20,7 +20,7 @@
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.8 2001/08/29 00:47:00 shadow Exp $");
+RCSID("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.7 2001/07/12 19:58:22 shadow Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
@@ -171,7 +171,7 @@
return (EFBIG);
}
#endif
-#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
+#ifdef AFS_VM_RDWR_ENV
/*
* If write is implemented via VM, afs_FakeOpen() is called from the
* high-level write op.
@@ -280,7 +280,7 @@
if (filePos > avc->m.Length)
avc->m.Length = filePos;
#endif
-#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
+#ifndef AFS_VM_RDWR_ENV
/*
* If write is implemented via VM, afs_DoPartialWrite() is called from
* the high-level write op.