startrxafs-fetchdata64-always-show-result-and-EFBIG-at-7fffffff-20011119
authorChas Williams <chas@cmf.nrl.navy.mil>
Mon, 19 Nov 2001 16:58:02 +0000 (16:58 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 19 Nov 2001 16:58:02 +0000 (16:58 +0000)
show fetch64 errors
also mask high bit for reporting EFBIG

src/afs/afs_dcache.c

index 535c350..488da1c 100644 (file)
@@ -2030,11 +2030,15 @@ struct dcache *afs_GetDCache(avc, abyte, areq, aoffset, alen, aflags)
 #ifdef RX_ENABLE_LOCKS
                         AFS_GLOCK();
 #endif /* RX_ENABLE_LOCKS */ 
+                       afs_Trace2(afs_iclSetp, CM_TRACE_FETCH64CODE,
+                                  ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, code);
                    } else {
                        bytes = rx_Read(tcall, (char *)&length_hi, sizeof(afs_int32));
 #ifdef RX_ENABLE_LOCKS
                         AFS_GLOCK();
 #endif /* RX_ENABLE_LOCKS */ 
+                       afs_Trace2(afs_iclSetp, CM_TRACE_FETCH64CODE,
+                                  ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, code);
                        if (bytes == sizeof(afs_int32)) {
                            length_hi = ntohl(length_hi);
                        } else {
@@ -2047,14 +2051,12 @@ struct dcache *afs_GetDCache(avc, abyte, areq, aoffset, alen, aflags)
 #ifdef RX_ENABLE_LOCKS
                             AFS_GLOCK();
 #endif /* RX_ENABLE_LOCKS */ 
-                           afs_Trace2(afs_iclSetp, CM_TRACE_FETCH64CODE,
-                              ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, code);
                            tcall = (struct rx_call *) 0;
                        }
                    }
                }
                if (code == RXGEN_OPCODE || afs_serverHasNo64Bit(tc)) {
-                   if (Position > 0xFFFFFFFF) {
+                   if (Position > 0x7FFFFFFF) {
                        code = EFBIG;
                    } else {
                        afs_int32 pos;