From c264965a635a71e3b21d49da7dc0998a87dd67ba Mon Sep 17 00:00:00 2001 From: Rainer Toebbicke Date: Thu, 4 Aug 2005 21:44:57 +0000 Subject: [PATCH] client-omit-zero-length-reads-20050804 The attached patch restores the behaviour of the 1.2.x client: writes appending to a file do not trigger a 0-length read which at best updates the current status. If another cache manager wrote to the same file in the meantime, the file status is updated only after the StoreData RPC (and for the changes the last one wins). --- src/afs/afs_dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index c77002e2e..cf4cef70a 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -1967,7 +1967,7 @@ afs_GetDCache(register struct vcache *avc, afs_size_t abyte, if ((aflags & 4) && (hiszero(avc->m.DataVersion))) doAdjustSize = 1; if ((AFS_CHUNKTOBASE(chunk) >= avc->m.Length) || - ((aflags & 4) && (abyte == Position) && (tlen >= size)))) + ((aflags & 4) && (abyte == Position) && (tlen >= size))) overWriteWholeChunk = 1; if (doAdjustSize || overWriteWholeChunk) { #if defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV) -- 2.39.5