From 20a5b58e23ceab1c6be60e173e631ee8fb6834a5 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 17 Oct 2009 08:49:03 +0100 Subject: [PATCH] afs_Conn must be called within the analyze loop afs_Analyze calls afs_PutConn, so each pass through the afs_Analyze loop must call afs_Conn to get a new connection handle. afs_CacheStoreVCache (part of the fetchstore refactoring) wasn't doing this, and so producing garbage data upon retries. Reviewed-on: http://gerrit.openafs.org/674 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/afs/afs_fetchstore.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index f94ad9eab..7b9bf05b8 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -593,28 +593,26 @@ afs_CacheStoreVCache(struct dcache **dcList, struct vcache *avc, ICL_HANDLE_OFFSET(base), ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(bytes), ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(length)); - tc = afs_Conn(&avc->f.fid, areq, 0); do { + tc = afs_Conn(&avc->f.fid, areq, 0); + #ifdef AFS_64BIT_CLIENT restart: #endif code = rxfs_storeInit(avc, tc, base, bytes, length, - sync, &ops, &rock); - if ( code ) - goto nocall; - - code = afs_CacheStoreDCaches(avc, dclist, bytes, anewDV, - &doProcessFS, &OutStatus, nchunks, nomore, ops, rock); + sync, &ops, &rock); + if ( !code ) { + code = afs_CacheStoreDCaches(avc, dclist, bytes, anewDV, + &doProcessFS, &OutStatus, + nchunks, nomore, ops, rock); + } -nocall: #ifdef AFS_64BIT_CLIENT if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) { afs_serverSetNo64Bit(tc); goto restart; } -#else - continue; /* dummy, label before block end won't work */ #endif /* AFS_64BIT_CLIENT */ } while (afs_Analyze (tc, code, &avc->f.fid, areq, -- 2.39.5