From bd6b25049331c07ccdeb806d82f73d71221b78f1 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Thu, 1 Jul 2010 16:07:40 -0400 Subject: [PATCH] Linux: cache bypass: deal with the afs_serverHasNo64Bit case Deal correctly with the case of a server with no 64-bit fetch support. In that case, the code needs to fallback to the standard FetchData call, similar to what happens in afs_fetchstore.c. Move existing check out of 64-bit-only branch so servers already known to be non-64-bit and not merely those newly discovered so execute the non-64-bit FetchData. Change-Id: I505ce6d88072bc3ee5208863717395a78f8562fa Reviewed-on: http://gerrit.openafs.org/2319 Reviewed-by: Matt Benjamin Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear --- src/afs/afs_bypasscache.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index baa79e1..1cd4bc9 100644 --- a/src/afs/afs_bypasscache.c +++ b/src/afs/afs_bypasscache.c @@ -594,23 +594,23 @@ afs_PrefetchNoCache(register struct vcache *avc, tcall = NULL; } } - if (code == RXGEN_OPCODE || afs_serverHasNo64Bit(tc)) { - if (auio->uio_offset > 0x7FFFFFFF) { - code = EFBIG; - } else { - afs_int32 pos; - pos = auio->uio_offset; - COND_GUNLOCK(locked); - if (!tcall) - tcall = rx_NewCall(tc->id); - code = StartRXAFS_FetchData(tcall, - (struct AFSFid *) &avc->f.fid.Fid, - pos, bparms->length); - COND_RE_GLOCK(locked); - } - afs_serverSetNo64Bit(tc); - } } /* afs_serverHasNo64Bit */ + if (code == RXGEN_OPCODE || afs_serverHasNo64Bit(tc)) { + if (auio->uio_offset > 0x7FFFFFFF) { + code = EFBIG; + } else { + afs_int32 pos; + pos = auio->uio_offset; + COND_GUNLOCK(locked); + if (!tcall) + tcall = rx_NewCall(tc->id); + code = StartRXAFS_FetchData(tcall, + (struct AFSFid *) &avc->f.fid.Fid, + pos, bparms->length); + COND_RE_GLOCK(locked); + } + afs_serverSetNo64Bit(tc); + } #else code = StartRXAFS_FetchData(tcall, (struct AFSFid *) &avc->f.fid.Fid, -- 1.9.4