mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
store64-cleanup-20050212
fix several deficiencies in 64 bit file size handling
This commit is contained in:
parent
e4552599b0
commit
cefe48fc13
@ -1301,8 +1301,9 @@ afs_UFSCacheStoreProc(register struct rx_call *acall, struct osi_file *afile,
|
||||
(*abytesXferredP) += code;
|
||||
#endif /* AFS_NOSTATS */
|
||||
if (code != got) {
|
||||
code = rx_Error(acall);
|
||||
osi_FreeLargeSpace(tbuffer);
|
||||
return -33;
|
||||
return code ? code : -33;
|
||||
}
|
||||
alen -= got;
|
||||
/*
|
||||
|
@ -383,8 +383,9 @@ afs_MemCacheStoreProc(register struct rx_call *acall,
|
||||
code = rx_WritevAlloc(acall, tiov, &tnio, RX_MAXIOVECS, tlen);
|
||||
RX_AFS_GLOCK();
|
||||
if (code <= 0) {
|
||||
code = rx_Error(acall);
|
||||
osi_FreeSmallSpace(tiov);
|
||||
return -33;
|
||||
return code ? code : -33;
|
||||
}
|
||||
tlen = code;
|
||||
code = afs_MemReadvBlk(mceP, offset, tiov, tnio, tlen);
|
||||
@ -399,8 +400,9 @@ afs_MemCacheStoreProc(register struct rx_call *acall,
|
||||
(*abytesXferredP) += code;
|
||||
#endif /* AFS_NOSTATS */
|
||||
if (code != tlen) {
|
||||
code = rx_Error(acall);
|
||||
osi_FreeSmallSpace(tiov);
|
||||
return -33;
|
||||
return code ? code : -33;
|
||||
}
|
||||
offset += tlen;
|
||||
alen -= tlen;
|
||||
|
@ -60,8 +60,8 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
|
||||
do {
|
||||
tc = afs_Conn(&avc->fid, areq, SHARED_LOCK);
|
||||
if (tc) {
|
||||
RX_AFS_GUNLOCK();
|
||||
retry:
|
||||
RX_AFS_GUNLOCK();
|
||||
tcall = rx_NewCall(tc->id);
|
||||
RX_AFS_GLOCK();
|
||||
/* Set the client mod time since we always want the file
|
||||
@ -104,17 +104,16 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
|
||||
#endif /* AFS_64BIT_CLIENT */
|
||||
if (code == 0) {
|
||||
code = EndRXAFS_StoreData(tcall, &OutStatus, &tsync);
|
||||
#ifdef AFS_64BIT_CLIENT
|
||||
if (code == RXGEN_OPCODE) {
|
||||
afs_serverSetNo64Bit(tc);
|
||||
code = rx_EndCall(tcall, code);
|
||||
goto retry;
|
||||
}
|
||||
#endif /* AFS_64BIT_CLIENT */
|
||||
}
|
||||
code = rx_EndCall(tcall, code);
|
||||
RX_AFS_GLOCK();
|
||||
XSTATS_END_TIME;
|
||||
#ifdef AFS_64BIT_CLIENT
|
||||
if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) {
|
||||
afs_serverSetNo64Bit(tc);
|
||||
goto retry;
|
||||
}
|
||||
#endif /* AFS_64BIT_CLIENT */
|
||||
} else
|
||||
code = -1;
|
||||
} while (afs_Analyze
|
||||
@ -508,14 +507,8 @@ afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
|
||||
shouldwake, &lp1, &lp2);
|
||||
#endif /* AFS_NOSTATS */
|
||||
afs_CFileClose(tfile);
|
||||
#ifdef AFS_64BIT_CLIENT
|
||||
if (code == RXGEN_OPCODE) {
|
||||
afs_serverSetNo64Bit(tc);
|
||||
goto restart;
|
||||
}
|
||||
#endif /* AFS_64BIT_CLIENT */
|
||||
if ((tdc->f.chunkBytes < afs_OtherCSize)
|
||||
&& (i < (nchunks - 1))) {
|
||||
&& (i < (nchunks - 1)) && code == 0) {
|
||||
int bsent, tlen, sbytes =
|
||||
afs_OtherCSize - tdc->f.chunkBytes;
|
||||
char *tbuffer =
|
||||
@ -567,6 +560,12 @@ afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
|
||||
if (code2)
|
||||
code = code2;
|
||||
}
|
||||
#ifdef AFS_64BIT_CLIENT
|
||||
if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) {
|
||||
afs_serverSetNo64Bit(tc);
|
||||
goto restart;
|
||||
}
|
||||
#endif /* AFS_64BIT_CLIENT */
|
||||
} while (afs_Analyze
|
||||
(tc, code, &avc->fid, areq,
|
||||
AFS_STATS_FS_RPCIDX_STOREDATA, SHARED_LOCK,
|
||||
|
Loading…
x
Reference in New Issue
Block a user