[OpenAFS-devel] Bug-fix for afs_dcache.c

Hartmut Reuter reuter@rzg.mpg.de
Mon, 05 Aug 2002 14:15:14 +0200


I am sorry, the bug fixed by this patch was introduced by myself some
months ago. It seems, however, the wrong value of (*alen) has not been
used very frequently. I saw a strange behavior only when reading beyond
the 2 GB line where the cache file is not memory mapped.

/afs/ipp/.cs/openafs/openafs/src/afs: cvs diff afs_dcache.c
Index: afs_dcache.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_dcache.c,v
retrieving revision 1.18
diff -r1.18 afs_dcache.c
1419a1420
>     adc->validPos = abase;
1473c1474
<           afs_Trace4(afs_iclSetp, CM_TRACE_DCACHEWAIT,
---
>           afs_Trace4(afs_iclSetp, CM_TRACE_DCACHEWAKE,
2399c2400
<       afs_Trace4(afs_iclSetp, CM_TRACE_DCACHEWAIT,
---
>       afs_Trace4(afs_iclSetp, CM_TRACE_DCACHEWAKE,
2490c2491
<       *alen = *aoffset + tdc->f.chunkBytes - abyte;
---
>       *alen = (tdc->f.chunkBytes - *aoffset);
/afs/ipp/.cs/openafs/openafs/src/afs:

I also made now a difference between waiting and waking up in the trace:

/afs/ipp/.cs/openafs/openafs/src/afs: cvs diff  afs_trace.et
Index: afs_trace.et
===================================================================
RCS file: /cvs/openafs/src/afs/afs_trace.et,v
retrieving revision 1.11
diff -r1.11 afs_trace.et
156,157c156,157
<       ec      CM_TRACE_DCACHEWAIT, "%s line %d: sleeping or waiting
for 0x%x flags 0x%x"
<       ec      CM_TRACE_VNODEREAD, "UFSRead: tdc 0x%x, offset (0x%x,
0x%x) len
(0x%x 0x%x)"
---
>       ec      CM_TRACE_DCACHEWAIT, "%s line %d: waiting for 0x%x flags 0x%x"
>       ec      CM_TRACE_VNODEREAD, "UFSRead: tdc 0x%x, offset (0x%x, 0x%x) len
(0x%x, 0x%x)"
162a163
>       ec      CM_TRACE_DCACHEWAKE, "%s line %d: waking up waiters for 0x%x flags 0x%x"
/afs/ipp/.cs/openafs/openafs/src/afs:

Thanks,
Hartmut 
-----------------------------------------------------------------
Hartmut Reuter                           e-mail reuter@rzg.mpg.de
					   phone +49-89-3299-1328
RZG (Rechenzentrum Garching)               fax   +49-89-3299-1301 
Computing Center of the Max-Planck-Gesellschaft (MPG) and the
Institut fuer Plasmaphysik (IPP)
-----------------------------------------------------------------