Index: openafs/src/NTMakefile diff -c openafs/src/NTMakefile:1.24 openafs/src/NTMakefile:1.24.2.1 *** openafs/src/NTMakefile:1.24 Wed Jun 23 09:24:43 2004 --- openafs/src/NTMakefile Tue Mar 22 14:48:28 2005 *************** *** 204,210 **** $(NTMAKE_HEADERS) $(CD) ..\.. ! afsdobjs: auth_headers echo ***** $@ $(DOCD) $(SRC)\WINNT\afsd $(CD) $(SRC)\WINNT\afsd --- 204,217 ---- $(NTMAKE_HEADERS) $(CD) ..\.. ! vlserver_headers: auth_headers ! echo ***** $@ ! $(DOCD) $(SRC)\vlserver ! $(CD) $(SRC)\vlserver ! $(NTMAKE_HEADERS) ! $(CD) ..\.. ! ! afsdobjs: vlserver_headers echo ***** $@ $(DOCD) $(SRC)\WINNT\afsd $(CD) $(SRC)\WINNT\afsd Index: openafs/src/WINNT/afsd/afsd.h diff -c openafs/src/WINNT/afsd/afsd.h:1.5.2.2 openafs/src/WINNT/afsd/afsd.h:1.5.2.3 *** openafs/src/WINNT/afsd/afsd.h:1.5.2.2 Fri Mar 11 01:58:37 2005 --- openafs/src/WINNT/afsd/afsd.h Mon Apr 4 22:17:15 2005 *************** *** 121,126 **** --- 121,128 ---- extern int cm_dnsEnabled; extern int cm_freelanceEnabled; + extern long rx_mtu; + #define CAPABILITY_ERRORTRANS (1<<0) #define CAPABILITY_BITS 1 Index: openafs/src/WINNT/afsd/afsd_init.c diff -c openafs/src/WINNT/afsd/afsd_init.c:1.40.2.17 openafs/src/WINNT/afsd/afsd_init.c:1.40.2.18 *** openafs/src/WINNT/afsd/afsd_init.c:1.40.2.17 Mon Mar 14 19:43:54 2005 --- openafs/src/WINNT/afsd/afsd_init.c Mon Apr 4 22:17:15 2005 *************** *** 59,65 **** int numBkgD; int numSvThreads; ! int traceOnPanic = 0; int logReady = 0; --- 59,65 ---- int numBkgD; int numSvThreads; ! long rx_mtu = -1; int traceOnPanic = 0; int logReady = 0; *************** *** 538,544 **** long traceBufSize; long maxcpus; long ltt, ltto; ! long rx_mtu, rx_nojumbo; long virtualCache = 0; char rootCellName[256]; struct rx_service *serverp; --- 538,544 ---- long traceBufSize; long maxcpus; long ltt, ltto; ! long rx_nojumbo; long virtualCache = 0; char rootCellName[256]; struct rx_service *serverp; Index: openafs/src/WINNT/afsd/afslogon.c diff -c openafs/src/WINNT/afsd/afslogon.c:1.24.2.7 openafs/src/WINNT/afsd/afslogon.c:1.24.2.8 *** openafs/src/WINNT/afsd/afslogon.c:1.24.2.7 Fri Mar 11 01:58:38 2005 --- openafs/src/WINNT/afsd/afslogon.c Wed Mar 23 17:31:45 2005 *************** *** 325,330 **** --- 325,332 ---- char computerName[MAX_COMPUTERNAME_LENGTH + 1]; char *effDomain; + memset(opt, 0, sizeof(LogonOptions_t)); + DebugEvent("In GetDomainLogonOptions for user [%s] in domain [%s]", username, domain); /* If the domain is the same as the Netbios computer name, we use the LOCALHOST domain name*/ opt->flags = LOGON_FLAG_REMOTE; Index: openafs/src/WINNT/afsd/cm_callback.c diff -c openafs/src/WINNT/afsd/cm_callback.c:1.20.2.8 openafs/src/WINNT/afsd/cm_callback.c:1.20.2.10 *** openafs/src/WINNT/afsd/cm_callback.c:1.20.2.8 Fri Mar 11 01:58:40 2005 --- openafs/src/WINNT/afsd/cm_callback.c Mon Apr 4 22:17:15 2005 *************** *** 964,974 **** for ( i=0; i < cm_noIPAddr; i++ ) { addr->addr_in[i] = cm_IPAddr[i]; addr->subnetmask[i] = cm_SubnetMask[i]; ! addr->mtu[i] = cm_NetMtu[i]; } - - MUTEX_EXIT(&callp->lock); return 0; } --- 964,974 ---- for ( i=0; i < cm_noIPAddr; i++ ) { addr->addr_in[i] = cm_IPAddr[i]; addr->subnetmask[i] = cm_SubnetMask[i]; ! addr->mtu[i] = (rx_mtu == -1 || (rx_mtu != -1 && cm_NetMtu[i] < rx_mtu)) ? ! cm_NetMtu[i] : rx_mtu; } + MUTEX_EXIT(&callp->lock); return 0; } *************** *** 1123,1129 **** for ( i=0; i < cm_noIPAddr; i++ ) { addr->addr_in[i] = cm_IPAddr[i]; addr->subnetmask[i] = cm_SubnetMask[i]; ! addr->mtu[i] = cm_NetMtu[i]; } dataBytes = 1 * sizeof(afs_int32); --- 1123,1130 ---- for ( i=0; i < cm_noIPAddr; i++ ) { addr->addr_in[i] = cm_IPAddr[i]; addr->subnetmask[i] = cm_SubnetMask[i]; ! addr->mtu[i] = (rx_mtu == -1 || (rx_mtu != -1 && cm_NetMtu[i] < rx_mtu)) ? ! cm_NetMtu[i] : rx_mtu; } dataBytes = 1 * sizeof(afs_int32); *************** *** 1133,1139 **** capabilities->Capabilities_val = dataBuffP; MUTEX_EXIT(&callp->lock); - return 0; } --- 1134,1139 ---- *************** *** 1517,1529 **** if (scp) { if (scp->cbServerp != cbrp->serverp) { serverp = scp->cbServerp; } - scp->cbServerp = cbrp->serverp; scp->cbExpires = cbrp->startTime + cbp->ExpirationTime; } else { ! serverp = cbrp->serverp; } ! cbrp->serverp = NULL; } /* a callback was actually revoked during our granting call, so --- 1517,1536 ---- if (scp) { if (scp->cbServerp != cbrp->serverp) { serverp = scp->cbServerp; + if (!freeFlag) + cm_GetServer(cbrp->serverp); + scp->cbServerp = cbrp->serverp; + } else { + if (freeFlag) + serverp = cbrp->serverp; } scp->cbExpires = cbrp->startTime + cbp->ExpirationTime; } else { ! if (freeFlag) ! serverp = cbrp->serverp; } ! if (freeFlag) ! cbrp->serverp = NULL; } /* a callback was actually revoked during our granting call, so Index: openafs/src/WINNT/afsd/cm_conn.c diff -c openafs/src/WINNT/afsd/cm_conn.c:1.25.2.7 openafs/src/WINNT/afsd/cm_conn.c:1.25.2.8 *** openafs/src/WINNT/afsd/cm_conn.c:1.25.2.7 Wed Mar 16 16:37:52 2005 --- openafs/src/WINNT/afsd/cm_conn.c Wed Mar 30 15:50:15 2005 *************** *** 99,114 **** static long cm_GetServerList(struct cm_fid *fidp, struct cm_user *userp, struct cm_req *reqp, cm_serverRef_t ***serversppp) { ! long code; cm_volume_t *volp = NULL; cm_cell_t *cellp = NULL; if (!fidp) { ! *serversppp = NULL; ! return 0; ! } ! cellp = cm_FindCellByID(fidp->cell); if (!cellp) return CM_ERROR_NOSUCHCELL; code = cm_GetVolumeByID(cellp, fidp->volume, userp, reqp, &volp); --- 99,114 ---- static long cm_GetServerList(struct cm_fid *fidp, struct cm_user *userp, struct cm_req *reqp, cm_serverRef_t ***serversppp) { ! long code; cm_volume_t *volp = NULL; cm_cell_t *cellp = NULL; if (!fidp) { ! *serversppp = NULL; ! return 0; ! } ! cellp = cm_FindCellByID(fidp->cell); if (!cellp) return CM_ERROR_NOSUCHCELL; code = cm_GetVolumeByID(cellp, fidp->volume, userp, reqp, &volp); *************** *** 117,123 **** *serversppp = cm_GetVolServers(volp, fidp->volume); cm_PutVolume(volp); ! return 0; } /* --- 117,123 ---- *serversppp = cm_GetVolServers(volp, fidp->volume); cm_PutVolume(volp); ! return 0; } /* *************** *** 204,210 **** } } ! /* if all servers are offline, mark them non-busy and start over */ else if (errorCode == CM_ERROR_ALLOFFLINE) { if (timeLeft > 7) { osi_Log0(afsd_logp, "cm_Analyze passed CM_ERROR_ALLOFFLINE."); --- 204,227 ---- } } ! /* if there is nosuchvolume, then we have a situation in which a ! * previously known volume no longer has a set of servers ! * associated with it. Either the volume has moved or ! * the volume has been deleted. Try to find a new server list ! * until the timeout period expires. ! */ ! else if (errorCode == CM_ERROR_NOSUCHVOLUME) { ! if (timeLeft > 7) { ! osi_Log0(afsd_logp, "cm_Analyze passed CM_ERROR_NOSUCHVOLUME."); ! thrd_Sleep(5000); ! ! retry = 1; ! ! if (fidp != NULL) /* Not a VLDB call */ ! cm_ForceUpdateVolume(fidp, userp, reqp); ! } ! } ! else if (errorCode == CM_ERROR_ALLOFFLINE) { if (timeLeft > 7) { osi_Log0(afsd_logp, "cm_Analyze passed CM_ERROR_ALLOFFLINE."); Index: openafs/src/WINNT/afsd/cm_dcache.c diff -c openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.6 openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.8 *** openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.6 Fri Mar 11 01:58:41 2005 --- openafs/src/WINNT/afsd/cm_dcache.c Thu Mar 31 01:05:47 2005 *************** *** 56,61 **** --- 56,62 ---- AFSVolSync volSync; AFSFid tfid; struct rx_call *callp; + struct rx_connection *rxconnp; osi_queueData_t *qdp; cm_buf_t *bufp; long wbytes; *************** *** 129,139 **** if (code) continue; ! lock_ObtainMutex(&connp->mx); ! callp = rx_NewCall(connp->callp); ! lock_ReleaseMutex(&connp->mx); ! osi_Log3(afsd_logp, "CALL StoreData vp %x, off 0x%x, size 0x%x", (long) scp, biod.offset.LowPart, nbytes); code = StartRXAFS_StoreData(callp, &tfid, &inStatus, --- 130,140 ---- if (code) continue; ! rxconnp = cm_GetRxConn(connp); ! callp = rx_NewCall(rxconnp); ! rx_PutConnection(rxconnp); ! osi_Log3(afsd_logp, "CALL StoreData scp 0x%x, off 0x%x, size 0x%x", (long) scp, biod.offset.LowPart, nbytes); code = StartRXAFS_StoreData(callp, &tfid, &inStatus, *************** *** 175,185 **** osi_Log1(afsd_logp, "EndRXAFS_StoreData failed (%lX)",code); } code = rx_EndCall(callp, code); - osi_Log0(afsd_logp, "CALL StoreData DONE"); } while (cm_Analyze(connp, userp, reqp, &scp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); /* now, clean up our state */ lock_ObtainMutex(&scp->mx); --- 176,190 ---- osi_Log1(afsd_logp, "EndRXAFS_StoreData failed (%lX)",code); } code = rx_EndCall(callp, code); } while (cm_Analyze(connp, userp, reqp, &scp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL StoreData FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL StoreData SUCCESS"); + /* now, clean up our state */ lock_ObtainMutex(&scp->mx); *************** *** 235,240 **** --- 240,246 ---- long truncPos; cm_conn_t *connp; struct rx_call *callp; + struct rx_connection *rxconnp; /* Serialize StoreData RPC's; for rationale see cm_scache.c */ (void) cm_SyncOp(scp, NULL, userp, reqp, 0, *************** *** 262,270 **** if (code) continue; ! lock_ObtainMutex(&connp->mx); ! callp = rx_NewCall(connp->callp); ! lock_ReleaseMutex(&connp->mx); code = StartRXAFS_StoreData(callp, &tfid, &inStatus, 0, 0, truncPos); --- 268,276 ---- if (code) continue; ! rxconnp = cm_GetRxConn(connp); ! callp = rx_NewCall(rxconnp); ! rx_PutConnection(rxconnp); code = StartRXAFS_StoreData(callp, &tfid, &inStatus, 0, 0, truncPos); *************** *** 1117,1122 **** --- 1123,1129 ---- osi_queueData_t *qdp; /* q element we're scanning */ AFSFid tfid; struct rx_call *callp; + struct rx_connection *rxconnp; cm_bulkIO_t biod; /* bulk IO descriptor */ cm_conn_t *connp; int getroot; *************** *** 1247,1256 **** code = cm_Conn(&scp->fid, up, reqp, &connp); if (code) continue; ! ! lock_ObtainMutex(&connp->mx); ! callp = rx_NewCall(connp->callp); ! lock_ReleaseMutex(&connp->mx); osi_Log3(afsd_logp, "CALL FetchData vp %x, off 0x%x, size 0x%x", (long) scp, biod.offset.LowPart, biod.length); --- 1254,1263 ---- code = cm_Conn(&scp->fid, up, reqp, &connp); if (code) continue; ! ! rxconnp = cm_GetRxConn(connp); ! callp = rx_NewCall(rxconnp); ! rx_PutConnection(rxconnp); osi_Log3(afsd_logp, "CALL FetchData vp %x, off 0x%x, size 0x%x", (long) scp, biod.offset.LowPart, biod.length); Index: openafs/src/WINNT/afsd/cm_ioctl.c diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.10 openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.11 *** openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.10 Fri Mar 11 01:58:42 2005 --- openafs/src/WINNT/afsd/cm_ioctl.c Wed Mar 30 15:50:15 2005 *************** *** 1114,1120 **** long cm_IoctlNewCell(struct smb_ioctl *ioctlp, struct cm_user *userp) { ! /* NT cache manager will read cell information from afsdcell.ini each time * cell is accessed. So, this call is necessary only if list of server for a cell * changes (or IP addresses of cell servers changes). * All that needs to be done is to refresh server information for all cells that --- 1114,1120 ---- long cm_IoctlNewCell(struct smb_ioctl *ioctlp, struct cm_user *userp) { ! /* NT cache manager will read cell information from CellServDB each time * cell is accessed. So, this call is necessary only if list of server for a cell * changes (or IP addresses of cell servers changes). * All that needs to be done is to refresh server information for all cells that Index: openafs/src/WINNT/afsd/cm_scache.c diff -c openafs/src/WINNT/afsd/cm_scache.c:1.14.2.7 openafs/src/WINNT/afsd/cm_scache.c:1.14.2.8 *** openafs/src/WINNT/afsd/cm_scache.c:1.14.2.7 Fri Mar 11 01:58:42 2005 --- openafs/src/WINNT/afsd/cm_scache.c Thu Mar 31 01:05:48 2005 *************** *** 412,418 **** if (cm_freelanceEnabled && special) { osi_Log0(afsd_logp,"cm_getSCache Freelance and special"); ! if (fidp->vnode > 1) { lock_ObtainMutex(&cm_Freelance_Lock); mp =(cm_localMountPoints+fidp->vnode-2)->mountPointStringp; lock_ReleaseMutex(&cm_Freelance_Lock); --- 412,418 ---- if (cm_freelanceEnabled && special) { osi_Log0(afsd_logp,"cm_getSCache Freelance and special"); ! if (fidp->vnode > 1 && fidp->vnode <= cm_localMountPoints + 2) { lock_ObtainMutex(&cm_Freelance_Lock); mp =(cm_localMountPoints+fidp->vnode-2)->mountPointStringp; lock_ReleaseMutex(&cm_Freelance_Lock); *************** *** 432,438 **** cm_data.hashTablep[hash]=scp; scp->flags |= CM_SCACHEFLAG_INHASH; scp->refCount = 1; ! scp->fileType = (cm_localMountPoints+fidp->vnode-2)->fileType; lock_ObtainMutex(&cm_Freelance_Lock); scp->length.LowPart = strlen(mp)+4; --- 432,441 ---- cm_data.hashTablep[hash]=scp; scp->flags |= CM_SCACHEFLAG_INHASH; scp->refCount = 1; ! if (fidp->vnode > 1 && fidp->vnode <= cm_localMountPoints + 2) ! scp->fileType = (cm_localMountPoints+fidp->vnode-2)->fileType; ! else ! scp->fileType = CM_SCACHETYPE_INVALID; lock_ObtainMutex(&cm_Freelance_Lock); scp->length.LowPart = strlen(mp)+4; Index: openafs/src/WINNT/afsd/cm_utils.c diff -c openafs/src/WINNT/afsd/cm_utils.c:1.5.14.2 openafs/src/WINNT/afsd/cm_utils.c:1.5.14.3 *** openafs/src/WINNT/afsd/cm_utils.c:1.5.14.2 Fri Mar 11 01:58:43 2005 --- openafs/src/WINNT/afsd/cm_utils.c Wed Mar 30 15:50:16 2005 *************** *** 80,115 **** long cm_MapRPCErrorRmdir(long error, cm_req_t *reqp) { ! if (error == 0) return 0; ! ! /* If we had to stop retrying, report our saved error code. */ ! if (reqp && error == CM_ERROR_TIMEDOUT) { ! if (reqp->accessError) ! return reqp->accessError; ! if (reqp->volumeError) ! return reqp->volumeError; ! if (reqp->rpcError) ! return reqp->rpcError; ! return error; ! } ! if (error < 0) ! error = CM_ERROR_TIMEDOUT; ! else if (error == 30) ! error = CM_ERROR_READONLY; ! else if (error == 20) ! error = CM_ERROR_NOTDIR; ! else if (error == 13) ! error = CM_ERROR_NOACCESS; ! else if (error == 2) ! error = CM_ERROR_NOSUCHFILE; ! else if (error == 17 /* AIX */ ! || error == 66 /* SunOS 4, Digital UNIX */ ! || error == 93 /* Solaris 2, IRIX */ ! || error == 247) /* HP/UX */ ! error = CM_ERROR_NOTEMPTY; return error; ! } long cm_MapVLRPCError(long error, cm_req_t *reqp) { --- 80,116 ---- long cm_MapRPCErrorRmdir(long error, cm_req_t *reqp) { ! if (error == 0) ! return 0; ! /* If we had to stop retrying, report our saved error code. */ ! if (reqp && error == CM_ERROR_TIMEDOUT) { ! if (reqp->accessError) ! return reqp->accessError; ! if (reqp->volumeError) ! return reqp->volumeError; ! if (reqp->rpcError) ! return reqp->rpcError; return error; ! } ! ! if (error < 0) ! error = CM_ERROR_TIMEDOUT; ! else if (error == 30) ! error = CM_ERROR_READONLY; ! else if (error == 20) ! error = CM_ERROR_NOTDIR; ! else if (error == 13) ! error = CM_ERROR_NOACCESS; ! else if (error == 2) ! error = CM_ERROR_NOSUCHFILE; ! else if (error == 17 /* AIX */ ! || error == 66 /* SunOS 4, Digital UNIX */ ! || error == 93 /* Solaris 2, IRIX */ ! || error == 247) /* HP/UX */ ! error = CM_ERROR_NOTEMPTY; ! return error; ! } long cm_MapVLRPCError(long error, cm_req_t *reqp) { Index: openafs/src/WINNT/afsd/cm_vnodeops.c diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.11 openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.15 *** openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.11 Fri Mar 11 01:58:43 2005 --- openafs/src/WINNT/afsd/cm_vnodeops.c Sat Apr 2 03:35:49 2005 *************** *** 324,330 **** * When CAP_NT_SMBS has been negotiated, deletion (of files or directories) is * done in three steps: * (1) open for deletion (NT_CREATE_AND_X) ! * (2) set for deletion on close (NTWTRANSACTION2, SET_FILE_INFO) * (3) close (CLOSE) * We must not do the RPC until step 3. But if we are going to return an error * code (e.g. directory not empty), we must return it by step 2, otherwise most --- 324,330 ---- * When CAP_NT_SMBS has been negotiated, deletion (of files or directories) is * done in three steps: * (1) open for deletion (NT_CREATE_AND_X) ! * (2) set for deletion on close (NT_TRANSACTION2, SET_FILE_INFO) * (3) close (CLOSE) * We must not do the RPC until step 3. But if we are going to return an error * code (e.g. directory not empty), we must return it by step 2, otherwise most *************** *** 595,601 **** break; } } /* if (wrong buffer) ... */ ! /* now we have the buffer containing the entry we're interested * in; copy it out if it represents a non-deleted entry. */ --- 595,601 ---- break; } } /* if (wrong buffer) ... */ ! /* now we have the buffer containing the entry we're interested * in; copy it out if it represents a non-deleted entry. */ *************** *** 1196,1201 **** --- 1196,1203 ---- afsFid.Volume = dscp->fid.volume; afsFid.Vnode = dscp->fid.vnode; afsFid.Unique = dscp->fid.unique; + + osi_Log1(afsd_logp, "CALL RemoveFile scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) *************** *** 1209,1214 **** --- 1211,1221 ---- } while (cm_Analyze(connp, userp, reqp, &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL RemoveFile FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL RemoveFile SUCCESS"); + lock_ObtainMutex(&dscp->mx); cm_dnlcRemove(dscp, namep); cm_SyncOpDone(dscp, NULL, sflags); *************** *** 1610,1616 **** cm_space_t *spacep; cm_scache_t *newRootScp; ! osi_Log1(afsd_logp, "Evaluating symlink vp %x", linkScp); code = cm_AssembleLink(linkScp, "", &newRootScp, &spacep, userp, reqp); if (code) --- 1617,1623 ---- cm_space_t *spacep; cm_scache_t *newRootScp; ! osi_Log1(afsd_logp, "Evaluating symlink scp 0x%x", linkScp); code = cm_AssembleLink(linkScp, "", &newRootScp, &spacep, userp, reqp); if (code) *************** *** 1772,1781 **** lock_ReleaseMutex(&dscp->mx); /* first, assemble the file IDs we need to stat */ code = cm_ApplyDir(dscp, cm_TryBulkProc, (void *) &bb, offsetp, userp, reqp, NULL); - lock_ObtainMutex(&dscp->mx); /* if we failed, bail out early */ ! if (code && code != CM_ERROR_STOPNOW) return; /* otherwise, we may have one or more bulk stat's worth of stuff in bb; * make the calls to create the entries. Handle AFSCBMAX files at a --- 1779,1790 ---- lock_ReleaseMutex(&dscp->mx); /* first, assemble the file IDs we need to stat */ code = cm_ApplyDir(dscp, cm_TryBulkProc, (void *) &bb, offsetp, userp, reqp, NULL); /* if we failed, bail out early */ ! if (code && code != CM_ERROR_STOPNOW) { ! lock_ObtainMutex(&dscp->mx); ! return; ! } /* otherwise, we may have one or more bulk stat's worth of stuff in bb; * make the calls to create the entries. Handle AFSCBMAX files at a *************** *** 1784,1790 **** filex = 0; while (filex < bb.counter) { filesThisCall = bb.counter - filex; ! if (filesThisCall > AFSCBMAX) filesThisCall = AFSCBMAX; fidStruct.AFSCBFids_len = filesThisCall; fidStruct.AFSCBFids_val = &bb.fids[filex]; --- 1793,1800 ---- filex = 0; while (filex < bb.counter) { filesThisCall = bb.counter - filex; ! if (filesThisCall > AFSCBMAX) ! filesThisCall = AFSCBMAX; fidStruct.AFSCBFids_len = filesThisCall; fidStruct.AFSCBFids_val = &bb.fids[filex]; *************** *** 1808,1823 **** &volSync, NULL, &cbReq, code)); code = cm_MapRPCError(code, reqp); ! osi_Log0(afsd_logp, "CALL BulkStatus DONE"); /* may as well quit on an error, since we're not going to do * much better on the next immediate call, either. */ ! if (code) break; /* otherwise, we should do the merges */ ! for(i = 0; ifid.cell; tfid.volume = bb.fids[j].Volume; --- 1818,1838 ---- &volSync, NULL, &cbReq, code)); code = cm_MapRPCError(code, reqp); ! if (code) ! osi_Log1(afsd_logp, "CALL BulkStatus FAILURE code 0x%x", code); ! else ! osi_Log0(afsd_logp, "CALL BulkStatus SUCCESS"); /* may as well quit on an error, since we're not going to do * much better on the next immediate call, either. */ ! if (code) { ! cm_EndCallbackGrantingCall(NULL, &cbReq, NULL, 0); break; + } /* otherwise, we should do the merges */ ! for (i = 0; ifid.cell; tfid.volume = bb.fids[j].Volume; *************** *** 1861,1866 **** --- 1876,1882 ---- filex += filesThisCall; } /* while there are still more files to process */ + lock_ObtainMutex(&dscp->mx); osi_Log0(afsd_logp, "END cm_TryBulkStat"); } *************** *** 2014,2028 **** /* make the attr structure */ cm_StatusFromAttr(&afsInStatus, scp, attrp); lock_ReleaseMutex(&scp->mx); if (code) return code; /* now make the RPC */ ! osi_Log1(afsd_logp, "CALL StoreStatus vp %x", (long) scp); ! tfid.Volume = scp->fid.volume; ! tfid.Vnode = scp->fid.vnode; ! tfid.Unique = scp->fid.unique; do { code = cm_Conn(&scp->fid, userp, reqp, &connp); if (code) --- 2030,2045 ---- /* make the attr structure */ cm_StatusFromAttr(&afsInStatus, scp, attrp); + tfid.Volume = scp->fid.volume; + tfid.Vnode = scp->fid.vnode; + tfid.Unique = scp->fid.unique; + lock_ReleaseMutex(&scp->mx); if (code) return code; /* now make the RPC */ ! osi_Log1(afsd_logp, "CALL StoreStatus scp 0x%x", (long) scp); do { code = cm_Conn(&scp->fid, userp, reqp, &connp); if (code) *************** *** 2037,2043 **** &scp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); ! osi_Log1(afsd_logp, "CALL StoreStatus DONE, code %d", code); lock_ObtainMutex(&scp->mx); cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_STORESTATUS); --- 2054,2063 ---- &scp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); ! if (code) ! osi_Log1(afsd_logp, "CALL StoreStatus FAILURE, code 0x%x", code); ! else ! osi_Log0(afsd_logp, "CALL StoreStatus SUCCESS"); lock_ObtainMutex(&scp->mx); cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_STORESTATUS); *************** *** 2096,2101 **** --- 2116,2122 ---- cm_StatusFromAttr(&inStatus, NULL, attrp); /* try the RPC now */ + osi_Log1(afsd_logp, "CALL CreateFile scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) *************** *** 2116,2121 **** --- 2137,2147 ---- &dscp->fid, &volSync, NULL, &cbReq, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL CreateFile FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL CreateFile SUCCESS"); + lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { *************** *** 2218,2223 **** --- 2244,2250 ---- cm_StatusFromAttr(&inStatus, NULL, attrp); /* try the RPC now */ + osi_Log1(afsd_logp, "CALL MakeDir scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) *************** *** 2238,2243 **** --- 2265,2275 ---- &dscp->fid, &volSync, NULL, &cbReq, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL MakeDir FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL MakeDir SUCCESS"); + lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { *************** *** 2302,2307 **** --- 2334,2341 ---- if (code) return code; + /* try the RPC now */ + osi_Log1(afsd_logp, "CALL Link scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) continue; *************** *** 2318,2330 **** code = RXAFS_Link(callp, &dirAFSFid, namep, &existingAFSFid, &newLinkStatus, &updatedDirStatus, &volSync); rx_PutConnection(callp); ! osi_Log1(smb_logp," RXAFS_Link returns %d", code); } while (cm_Analyze(connp, userp, reqp, &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { --- 2352,2369 ---- code = RXAFS_Link(callp, &dirAFSFid, namep, &existingAFSFid, &newLinkStatus, &updatedDirStatus, &volSync); rx_PutConnection(callp); ! osi_Log1(smb_logp," RXAFS_Link returns 0x%x", code); } while (cm_Analyze(connp, userp, reqp, &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL Link FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL Link SUCCESS"); + lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { *************** *** 2364,2369 **** --- 2403,2409 ---- cm_StatusFromAttr(&inStatus, NULL, attrp); /* try the RPC now */ + osi_Log1(afsd_logp, "CALL Symlink scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) *************** *** 2383,2388 **** --- 2423,2433 ---- &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL Symlink FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL Symlink SUCCESS"); + lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { *************** *** 2440,2445 **** --- 2485,2491 ---- didEnd = 0; /* try the RPC now */ + osi_Log1(afsd_logp, "CALL RemoveDir scp 0x%x", (long) dscp); do { code = cm_Conn(&dscp->fid, userp, reqp, &connp); if (code) *************** *** 2457,2467 **** } while (cm_Analyze(connp, userp, reqp, &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCErrorRmdir(code, reqp); ! lock_ObtainMutex(&dscp->mx); - cm_dnlcRemove(dscp, namep); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { cm_MergeStatus(dscp, &updatedDirStatus, &volSync, userp, 0); } lock_ReleaseMutex(&dscp->mx); --- 2503,2518 ---- } while (cm_Analyze(connp, userp, reqp, &dscp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCErrorRmdir(code, reqp); ! ! if (code) ! osi_Log1(afsd_logp, "CALL RemoveDir FAILURE, code 0x%x", code); ! else ! osi_Log0(afsd_logp, "CALL RemoveDir SUCCESS"); ! lock_ObtainMutex(&dscp->mx); cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_STOREDATA); if (code == 0) { + cm_dnlcRemove(dscp, namep); cm_MergeStatus(dscp, &updatedDirStatus, &volSync, userp, 0); } lock_ReleaseMutex(&dscp->mx); *************** *** 2581,2586 **** --- 2632,2639 ---- didEnd = 0; /* try the RPC now */ + osi_Log2(afsd_logp, "CALL Rename old scp 0x%x new scp 0x%x", + (long) oldDscp, (long) newDscp); do { code = cm_Conn(&oldDscp->fid, userp, reqp, &connp); if (code) *************** *** 2604,2609 **** --- 2657,2667 ---- &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + if (code) + osi_Log1(afsd_logp, "CALL Rename FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL Rename SUCCESS"); + /* update the individual stat cache entries for the directories */ lock_ObtainMutex(&oldDscp->mx); cm_SyncOpDone(oldDscp, NULL, CM_SCACHESYNC_STOREDATA); *************** *** 2766,2771 **** --- 2824,2830 ---- tfid.Vnode = scp->fid.vnode; tfid.Unique = scp->fid.unique; lock_ReleaseMutex(&scp->mx); + osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp); do { code = cm_Conn(&scp->fid, userp, reqp, &connp); if (code) *************** *** 2778,2783 **** --- 2837,2848 ---- } while (cm_Analyze(connp, userp, reqp, &scp->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, reqp); + + if (code) + osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS"); + lock_ObtainMutex(&scp->mx); } *************** *** 2811,2816 **** --- 2876,2882 ---- tfid.Vnode = fileLock->fid.vnode; tfid.Unique = fileLock->fid.unique; lock_ReleaseWrite(&cm_scacheLock); + osi_Log1(afsd_logp, "CALL ExtendLock lock 0x%x", (long) fileLock); do { code = cm_Conn(&fileLock->fid, fileLock->userp, &req, &connp); *************** *** 2826,2831 **** --- 2892,2902 ---- &fileLock->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, &req); + if (code) + osi_Log1(afsd_logp, "CALL ExtendLock FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL ExtendLock SUCCESS"); + lock_ObtainWrite(&cm_scacheLock); } q = nq; *************** *** 2884,2889 **** --- 2955,2961 ---- tfid.Volume = oldFileLock->fid.volume; tfid.Vnode = oldFileLock->fid.vnode; tfid.Unique = oldFileLock->fid.unique; + osi_Log1(afsd_logp, "CALL SetLock lock 0x%x", (long) oldFileLock); do { code = cm_Conn(&oldFileLock->fid, oldFileLock->userp, &req, &connp); *************** *** 2899,2904 **** --- 2971,2981 ---- &oldFileLock->fid, &volSync, NULL, NULL, code)); code = cm_MapRPCError(code, &req); + + if (code) + osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code); + else + osi_Log0(afsd_logp, "CALL SetLock SUCCESS"); } handleCode: Index: openafs/src/WINNT/afsd/cm_volume.c diff -c openafs/src/WINNT/afsd/cm_volume.c:1.8.2.4 openafs/src/WINNT/afsd/cm_volume.c:1.8.2.5 *** openafs/src/WINNT/afsd/cm_volume.c:1.8.2.4 Fri Mar 11 01:58:43 2005 --- openafs/src/WINNT/afsd/cm_volume.c Wed Mar 30 15:50:16 2005 *************** *** 423,442 **** /* otherwise, get from VLDB */ if (!volp) { ! if ( cm_data.currentVolumes >= cm_data.maxVolumes ) osi_panic("Exceeded Max Volumes", __FILE__, __LINE__); ! volp = &cm_data.volumeBaseAddress[cm_data.currentVolumes++]; ! memset(volp, 0, sizeof(cm_volume_t)); ! volp->magic = CM_VOLUME_MAGIC; volp->cellp = cellp; - volp->nextp = cm_data.allVolumesp; - cm_data.allVolumesp = volp; strncpy(volp->namep, volumeNamep, VL_MAXNAMELEN); volp->namep[VL_MAXNAMELEN-1] = '\0'; - lock_InitializeMutex(&volp->mx, "cm_volume_t mutex"); volp->refCount = 1; /* starts off held */ ! volp->flags |= CM_VOLUMEFLAG_RESET; } else { volp->refCount++; --- 423,457 ---- /* otherwise, get from VLDB */ if (!volp) { ! if ( cm_data.currentVolumes >= cm_data.maxVolumes ) { ! for (volp = cm_data.allVolumesp; volp; volp=volp->nextp) { ! if ( volp->refCount == 0 ) { ! /* There is one we can re-use */ ! break; ! } ! } osi_panic("Exceeded Max Volumes", __FILE__, __LINE__); + } ! if (volp) { ! volp->rwID = volp->roID = volp->bkID = 0; ! volp->dotdotFid.cell = 0; ! volp->dotdotFid.volume = 0; ! volp->dotdotFid.unique = 0; ! volp->dotdotFid.vnode = 0; ! } else { ! volp = &cm_data.volumeBaseAddress[cm_data.currentVolumes++]; ! memset(volp, 0, sizeof(cm_volume_t)); ! volp->magic = CM_VOLUME_MAGIC; ! volp->nextp = cm_data.allVolumesp; ! cm_data.allVolumesp = volp; ! lock_InitializeMutex(&volp->mx, "cm_volume_t mutex"); ! } volp->cellp = cellp; strncpy(volp->namep, volumeNamep, VL_MAXNAMELEN); volp->namep[VL_MAXNAMELEN-1] = '\0'; volp->refCount = 1; /* starts off held */ ! volp->flags = CM_VOLUMEFLAG_RESET; } else { volp->refCount++; *************** *** 509,524 **** /* find the appropriate servers from a volume */ cm_serverRef_t **cm_GetVolServers(cm_volume_t *volp, unsigned long volume) { ! cm_serverRef_t **serverspp; cm_serverRef_t *current;; lock_ObtainWrite(&cm_serverLock); ! if (volume == volp->rwID) serverspp = &volp->rwServersp; ! else if (volume == volp->roID) serverspp = &volp->roServersp; ! else if (volume == volp->bkID) serverspp = &volp->bkServersp; else osi_panic("bad volume ID in cm_GetVolServers", __FILE__, __LINE__); --- 524,539 ---- /* find the appropriate servers from a volume */ cm_serverRef_t **cm_GetVolServers(cm_volume_t *volp, unsigned long volume) { ! cm_serverRef_t **serverspp; cm_serverRef_t *current;; lock_ObtainWrite(&cm_serverLock); ! if (volume == volp->rwID) serverspp = &volp->rwServersp; ! else if (volume == volp->roID) serverspp = &volp->roServersp; ! else if (volume == volp->bkID) serverspp = &volp->bkServersp; else osi_panic("bad volume ID in cm_GetVolServers", __FILE__, __LINE__); *************** *** 533,541 **** void cm_PutVolume(cm_volume_t *volp) { ! lock_ObtainWrite(&cm_volumeLock); ! osi_assert(volp->refCount-- > 0); ! lock_ReleaseWrite(&cm_volumeLock); } /* return the read-only volume, if there is one, or the read-write volume if --- 548,556 ---- void cm_PutVolume(cm_volume_t *volp) { ! lock_ObtainWrite(&cm_volumeLock); ! osi_assert(volp->refCount-- > 0); ! lock_ReleaseWrite(&cm_volumeLock); } /* return the read-only volume, if there is one, or the read-write volume if Index: openafs/src/WINNT/afsd/smb.c diff -c openafs/src/WINNT/afsd/smb.c:1.55.2.16 openafs/src/WINNT/afsd/smb.c:1.55.2.20 *** openafs/src/WINNT/afsd/smb.c:1.55.2.16 Mon Mar 21 11:28:33 2005 --- openafs/src/WINNT/afsd/smb.c Thu Mar 31 18:36:42 2005 *************** *** 161,168 **** */ time_t smb_localZero = 0; /* Time difference for converting to kludge-GMT */ ! int smb_NowTZ; char *smb_localNamep = NULL; --- 161,172 ---- */ time_t smb_localZero = 0; + #define USE_NUMERIC_TIME_CONV 1 + + #ifndef USE_NUMERIC_TIME_CONV /* Time difference for converting to kludge-GMT */ ! afs_uint32 smb_NowTZ; ! #endif /* USE_NUMERIC_TIME_CONV */ char *smb_localNamep = NULL; *************** *** 543,549 **** #endif /* DJGPP */ ! void CompensateForSmbClientLastWriteTimeBugs(long *pLastWriteTime) { BOOL dst; /* Will be TRUE if observing DST */ LONG dstBias; /* Offset from local time if observing DST */ --- 547,553 ---- #endif /* DJGPP */ ! void CompensateForSmbClientLastWriteTimeBugs(afs_uint32 *pLastWriteTime) { BOOL dst; /* Will be TRUE if observing DST */ LONG dstBias; /* Offset from local time if observing DST */ *************** *** 579,584 **** --- 583,589 ---- *pLastWriteTime -= (-bias * 60); /* Convert bias to seconds */ } + #ifndef USE_NUMERIC_TIME_CONV /* * Calculate the difference (in seconds) between local time and GMT. * This enables us to convert file times to kludge-GMT. *************** *** 595,615 **** local_tm = *(localtime(&t)); days = local_tm.tm_yday - gmt_tm.tm_yday; ! hours = 24 * days + local_tm.tm_hour - gmt_tm.tm_hour ! #ifdef COMMENT ! /* There is a problem with DST immediately after the time change ! * which may continue to exist until the machine is rebooted ! */ ! - (local_tm.tm_isdst ? 1 : 0) ! #endif /* COMMENT */ ! ; minutes = 60 * hours + local_tm.tm_min - gmt_tm.tm_min; seconds = 60 * minutes + local_tm.tm_sec - gmt_tm.tm_sec; smb_NowTZ = seconds; } #ifndef DJGPP void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, time_t unixTime) { struct tm *ltp; --- 600,625 ---- local_tm = *(localtime(&t)); days = local_tm.tm_yday - gmt_tm.tm_yday; ! hours = 24 * days + local_tm.tm_hour - gmt_tm.tm_hour; minutes = 60 * hours + local_tm.tm_min - gmt_tm.tm_min; seconds = 60 * minutes + local_tm.tm_sec - gmt_tm.tm_sec; smb_NowTZ = seconds; } + #endif /* USE_NUMERIC_TIME_CONV */ #ifndef DJGPP + #ifdef USE_NUMERIC_TIME_CONV + void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, time_t unixTime) + { + // Note that LONGLONG is a 64-bit value + LONGLONG ll; + + ll = Int32x32To64(unixTime, 10000000) + 116444736000000000; + largeTimep->dwLowDateTime = (DWORD)(ll & 0xFFFFFFFF); + largeTimep->dwHighDateTime = (DWORD)(ll >> 32); + } + #else void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, time_t unixTime) { struct tm *ltp; *************** *** 649,654 **** --- 659,665 ---- SystemTimeToFileTime(&stm, largeTimep); } + #endif /* USE_NUMERIC_TIME_CONV */ #else /* DJGPP */ void smb_LargeSearchTimeFromUnixTime(FILETIME *largeTimep, time_t unixTime) { *************** *** 672,677 **** --- 683,704 ---- #endif /* !DJGPP */ #ifndef DJGPP + #ifdef USE_NUMERIC_TIME_CONV + void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep) + { + // Note that LONGLONG is a 64-bit value + LONGLONG ll; + + ll = largeTimep->dwHighDateTime; + ll <<= 32; + ll += largeTimep->dwLowDateTime; + + ll -= 116444736000000000; + ll /= 10000000; + + *unixTimep = (DWORD)ll; + } + #else /* USE_NUMERIC_TIME_CONV */ void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep) { SYSTEMTIME stm; *************** *** 694,699 **** --- 721,727 ---- *unixTimep = mktime(<); _timezone = save_timezone; } + #endif /* USE_NUMERIC_TIME_CONV */ #else /* DJGPP */ void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep) { *************** *** 716,722 **** } #endif /* !DJGPP */ ! void smb_SearchTimeFromUnixTime(time_t *dosTimep, time_t unixTime) { struct tm *ltp; int dosDate; --- 744,750 ---- } #endif /* !DJGPP */ ! void smb_SearchTimeFromUnixTime(afs_uint32 *searchTimep, time_t unixTime) { struct tm *ltp; int dosDate; *************** *** 739,748 **** dosDate = ((ltp->tm_year-80)<<9) | ((ltp->tm_mon+1) << 5) | (ltp->tm_mday); dosTime = (ltp->tm_hour<<11) | (ltp->tm_min << 5) | (ltp->tm_sec / 2); ! *dosTimep = (dosDate<<16) | dosTime; } ! void smb_UnixTimeFromSearchTime(time_t *unixTimep, time_t searchTime) { unsigned short dosDate; unsigned short dosTime; --- 767,776 ---- dosDate = ((ltp->tm_year-80)<<9) | ((ltp->tm_mon+1) << 5) | (ltp->tm_mday); dosTime = (ltp->tm_hour<<11) | (ltp->tm_min << 5) | (ltp->tm_sec / 2); ! *searchTimep = (dosDate<<16) | dosTime; } ! void smb_UnixTimeFromSearchTime(time_t *unixTimep, afs_uint32 searchTime) { unsigned short dosDate; unsigned short dosTime; *************** *** 762,773 **** *unixTimep = mktime(&localTm); } ! void smb_DosUTimeFromUnixTime(time_t *dosUTimep, time_t unixTime) { *dosUTimep = unixTime - smb_localZero; } ! void smb_UnixTimeFromDosUTime(time_t *unixTimep, time_t dosTime) { #ifndef DJGPP *unixTimep = dosTime + smb_localZero; --- 790,801 ---- *unixTimep = mktime(&localTm); } ! void smb_DosUTimeFromUnixTime(afs_uint32 *dosUTimep, time_t unixTime) { *dosUTimep = unixTime - smb_localZero; } ! void smb_UnixTimeFromDosUTime(time_t *unixTimep, afs_uint32 dosTime) { #ifndef DJGPP *unixTimep = dosTime + smb_localZero; *************** *** 1841,1847 **** tbp = GetPacket(); memcpy(tbp, pkt, sizeof(smb_packet_t)); tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data); ! smb_HoldVC(tbp->vcp); return tbp; } --- 1869,1876 ---- tbp = GetPacket(); memcpy(tbp, pkt, sizeof(smb_packet_t)); tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data); ! if (tbp->vcp) ! smb_HoldVC(tbp->vcp); return tbp; } *************** *** 2711,2717 **** char protocol_array[10][1024]; /* protocol signature of the client */ int caps; /* capabilities */ time_t unixTime; ! time_t dosTime; TIME_ZONE_INFORMATION tzi; osi_Log1(smb_logp, "SMB receive negotiate; %d + 1 ongoing ops", --- 2740,2746 ---- char protocol_array[10][1024]; /* protocol signature of the client */ int caps; /* capabilities */ time_t unixTime; ! afs_uint32 dosTime; TIME_ZONE_INFORMATION tzi; osi_Log1(smb_logp, "SMB receive negotiate; %d + 1 ongoing ops", *************** *** 2951,2958 **** myTime.tm_sec = 0; smb_localZero = mktime(&myTime); smb_CalculateNowTZ(); ! #ifdef AFS_FREELANCE if ( smb_localZero != old_localZero ) cm_noteLocalMountPointChange(); --- 2980,2988 ---- myTime.tm_sec = 0; smb_localZero = mktime(&myTime); + #ifndef USE_NUMERIC_TIME_CONV smb_CalculateNowTZ(); ! #endif /* USE_NUMERIC_TIME_CONV */ #ifdef AFS_FREELANCE if ( smb_localZero != old_localZero ) cm_noteLocalMountPointChange(); *************** *** 3303,3309 **** long code = 0; cm_scache_t *scp; char *dptr; ! time_t dosTime; u_short shortTemp; char attr; smb_dirListPatch_t *patchp; --- 3333,3339 ---- long code = 0; cm_scache_t *scp; char *dptr; ! afs_uint32 dosTime; u_short shortTemp; char attr; smb_dirListPatch_t *patchp; *************** *** 3990,3996 **** unsigned short attribute; cm_attr_t attr; cm_scache_t *newScp; ! time_t dosTime; cm_user_t *userp; int caseFold; char *tidPathp; --- 4020,4026 ---- unsigned short attribute; cm_attr_t attr; cm_scache_t *newScp; ! afs_uint32 dosTime; cm_user_t *userp; int caseFold; char *tidPathp; *************** *** 4100,4106 **** long code = 0; cm_scache_t *rootScp; cm_scache_t *newScp, *dscp; ! time_t dosTime; int attrs; cm_user_t *userp; int caseFold; --- 4130,4136 ---- long code = 0; cm_scache_t *rootScp; cm_scache_t *newScp, *dscp; ! afs_uint32 dosTime; int attrs; cm_user_t *userp; int caseFold; *************** *** 4282,4288 **** long code = 0; cm_user_t *userp; cm_scache_t *scp; ! time_t dosTime; int caseFold; cm_space_t *spacep; char *tidPathp; --- 4312,4318 ---- long code = 0; cm_user_t *userp; cm_scache_t *scp; ! afs_uint32 dosTime; int caseFold; cm_space_t *spacep; char *tidPathp; *************** *** 5207,5213 **** unsigned short fid; smb_fid_t *fidp; cm_user_t *userp; ! long dosTime; long code = 0; cm_req_t req; --- 5237,5243 ---- unsigned short fid; smb_fid_t *fidp; cm_user_t *userp; ! afs_uint32 dosTime; long code = 0; cm_req_t req; *************** *** 6193,6199 **** int attributes; char *lastNamep; int caseFold; ! long dosTime; char *tidPathp; cm_req_t req; --- 6223,6229 ---- int attributes; char *lastNamep; int caseFold; ! afs_uint32 dosTime; char *tidPathp; cm_req_t req; *************** *** 6518,6528 **** code = smb_ReceiveCoreWriteRaw (vcp, inp, outp, rwcp); else { ! osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp[%x] lana[%d] lsn[%d]",(int)vcp,vcp->lana,vcp->lsn); ! osi_Log4(smb_logp,"Dispatch %s vcp[%x] lana[%d] lsn[%d]",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn); code = (*(dp->procp)) (vcp, inp, outp); ! osi_LogEvent("AFS Dispatch return",NULL,"Code[%d]",(code==0)?0:code-CM_ERROR_BASE); ! osi_Log1(smb_logp,"Dispatch return code[%d]",(code==0)?0:code-CM_ERROR_BASE); #ifdef LOG_PACKET if ( code == CM_ERROR_BADSMB || code == CM_ERROR_BADOP ) --- 6548,6558 ---- code = smb_ReceiveCoreWriteRaw (vcp, inp, outp, rwcp); else { ! osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp 0x%x lana %d lsn %d",(int)vcp,vcp->lana,vcp->lsn); ! osi_Log4(smb_logp,"Dispatch %s vcp 0x%x lana %d lsn %d",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn); code = (*(dp->procp)) (vcp, inp, outp); ! osi_LogEvent("AFS Dispatch return",NULL,"Code 0x%x",(code==0)?0:code-CM_ERROR_BASE); ! osi_Log4(smb_logp,"Dispatch return code 0x%x vcp 0x%x lana %d lsn %d",(code==0)?0:code-CM_ERROR_BASE,vcp,vcp->lana,vcp->lsn); #ifdef LOG_PACKET if ( code == CM_ERROR_BADSMB || code == CM_ERROR_BADOP ) *************** *** 6972,6978 **** if (idx_NCB < 0 || idx_NCB > (sizeof(NCBs) / sizeof(NCBs[0]))) { /* this is fatal - log as much as possible */ ! osi_Log1(smb_logp, "Fatal: idx_NCB [ %d ] out of range.\n", idx_NCB); osi_assert(0); } --- 7002,7008 ---- if (idx_NCB < 0 || idx_NCB > (sizeof(NCBs) / sizeof(NCBs[0]))) { /* this is fatal - log as much as possible */ ! osi_Log1(smb_logp, "Fatal: idx_NCB %d out of range.\n", idx_NCB); osi_assert(0); } *************** *** 7001,7013 **** osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: illegal buffer address", ncbp->ncb_lsn, idx_session); break; case 0x08: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: lsn %d session number out of range", ncbp->ncb_lsn, idx_session); break; case 0x09: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: no resource available", ncbp->ncb_lsn, idx_session); break; case 0x0a: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: lsn %d session closed", ncbp->ncb_lsn, idx_session); break; case 0x0b: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: command cancelled", ncbp->ncb_lsn, idx_session); --- 7031,7043 ---- osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: illegal buffer address", ncbp->ncb_lsn, idx_session); break; case 0x08: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: session number out of range", ncbp->ncb_lsn, idx_session); break; case 0x09: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: no resource available", ncbp->ncb_lsn, idx_session); break; case 0x0a: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: session closed", ncbp->ncb_lsn, idx_session); break; case 0x0b: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: command cancelled", ncbp->ncb_lsn, idx_session); *************** *** 7022,7031 **** osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: no deletions, name has active lsn %d sessions", ncbp->ncb_lsn, idx_session); break; case 0x11: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: local lsn %d session table full", ncbp->ncb_lsn, idx_session); break; case 0x12: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: remote lsn %d session table full", ncbp->ncb_lsn, idx_session); break; case 0x13: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: illegal name number", ncbp->ncb_lsn, idx_session); --- 7052,7061 ---- osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: no deletions, name has active lsn %d sessions", ncbp->ncb_lsn, idx_session); break; case 0x11: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: local session table full", ncbp->ncb_lsn, idx_session); break; case 0x12: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: remote session table full", ncbp->ncb_lsn, idx_session); break; case 0x13: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: illegal name number", ncbp->ncb_lsn, idx_session); *************** *** 7043,7049 **** osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: name deleted", ncbp->ncb_lsn, idx_session); break; case 0x18: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: lsn %d session ended abnormally", ncbp->ncb_lsn, idx_session); break; case 0x19: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: name conflict detected", ncbp->ncb_lsn, idx_session); --- 7073,7079 ---- osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: name deleted", ncbp->ncb_lsn, idx_session); break; case 0x18: ! osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: session ended abnormally", ncbp->ncb_lsn, idx_session); break; case 0x19: osi_Log2(smb_logp, "NCBRECV failure lsn %d session %d: name conflict detected", ncbp->ncb_lsn, idx_session); *************** *** 7107,7115 **** break; case NRC_PENDING: ! /* Can this happen? Or is it just my ! * UNIX paranoia? ! */ continue; case NRC_SCLOSED: --- 7137,7144 ---- break; case NRC_PENDING: ! /* Can this happen? Or is it just my UNIX paranoia? */ ! osi_Log2(smb_logp, "NCBRECV pending lsn %d session %d", ncbp->ncb_lsn, idx_session); continue; case NRC_SCLOSED: *************** *** 7127,7141 **** * also cleanup after dead vcp */ if (vcp) { ! if (dead_vcp) ! osi_Log1(smb_logp, ! "dead_vcp already set, %x", ! dead_vcp); else if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) { ! osi_Log2(smb_logp, ! "setting dead_vcp %x, user struct %x", vcp, vcp->usersp); smb_HoldVC(vcp); dead_vcp = vcp; vcp->flags |= SMB_VCFLAG_ALREADYDEAD; } --- 7156,7172 ---- * also cleanup after dead vcp */ if (vcp) { ! if (dead_vcp == vcp) ! osi_Log1(smb_logp, "dead_vcp already set, 0x%x", dead_vcp); else if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) { ! osi_Log2(smb_logp, "setting dead_vcp 0x%x, user struct 0x%x", vcp, vcp->usersp); smb_HoldVC(vcp); + if (dead_vcp) { + smb_ReleaseVC(dead_vcp); + osi_Log1(smb_logp, + "Previous dead_vcp %x", dead_vcp); + } dead_vcp = vcp; vcp->flags |= SMB_VCFLAG_ALREADYDEAD; } *************** *** 7551,7557 **** vcp = smb_FindVC(ncbp->ncb_lsn, SMB_FLAG_CREATE, ncbp->ncb_lana_num); vcp->flags |= flags; strcpy(vcp->rname, rname); - smb_ReleaseVC(vcp); /* Allocate slot in session arrays */ /* Re-use dead session if possible, otherwise add one more */ --- 7582,7587 ---- *************** *** 7564,7606 **** } } ! /* assert that we do not exceed the maximum number of sessions or NCBs. ! * we should probably want to wait for a session to be freed in case ! * we run out. ! */ ! osi_assert(i < Sessionmax - 1); ! osi_assert(numNCBs < NCBmax - 1); /* if we pass this test we can allocate one more */ ! LSNs[i] = ncbp->ncb_lsn; ! lanas[i] = ncbp->ncb_lana_num; ! if (i == numSessions) { ! /* Add new NCB for new session */ ! char eventName[MAX_PATH]; ! ! osi_Log1(smb_logp, "smb_Listener creating new session %d", i); ! ! InitNCBslot(numNCBs); ! numNCBs++; ! thrd_SetEvent(NCBavails[0]); ! thrd_SetEvent(NCBevents[0]); ! for (j = 0; j < smb_NumServerThreads; j++) ! thrd_SetEvent(NCBreturns[j][0]); ! /* Also add new session event */ ! sprintf(eventName, "SessionEvents[%d]", i); ! SessionEvents[i] = thrd_CreateEvent(NULL, FALSE, TRUE, eventName); ! if ( GetLastError() == ERROR_ALREADY_EXISTS ) ! osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName)); ! numSessions++; ! osi_Log2(smb_logp, "increasing numNCBs [ %d ] numSessions [ %d ]", numNCBs, numSessions); ! thrd_SetEvent(SessionEvents[0]); ! } else { ! thrd_SetEvent(SessionEvents[i]); } /* unlock */ lock_ReleaseMutex(&smb_ListenerLock); - } /* dispatch while loop */ } --- 7594,7675 ---- } } ! if (i >= Sessionmax - 1 || numNCBs >= NCBmax - 1) { ! unsigned long code = CM_ERROR_ALLBUSY; ! smb_packet_t * outp = GetPacket(); ! unsigned char *outWctp; ! smb_t *smbp; ! ! outp->ncbp = ncbp; ! if (vcp->flags & SMB_VCFLAG_STATUS32) { ! unsigned long NTStatus; ! smb_MapNTError(code, &NTStatus); ! outWctp = outp->wctp; ! smbp = (smb_t *) &outp->data; ! *outWctp++ = 0; ! *outWctp++ = 0; ! *outWctp++ = 0; ! smbp->rcls = (unsigned char) (NTStatus & 0xff); ! smbp->reh = (unsigned char) ((NTStatus >> 8) & 0xff); ! smbp->errLow = (unsigned char) ((NTStatus >> 16) & 0xff); ! smbp->errHigh = (unsigned char) ((NTStatus >> 24) & 0xff); ! smbp->flg2 |= SMB_FLAGS2_32BIT_STATUS; ! } else { ! unsigned short errCode; ! unsigned char errClass; ! smb_MapCoreError(code, vcp, &errCode, &errClass); ! outWctp = outp->wctp; ! smbp = (smb_t *) &outp->data; ! *outWctp++ = 0; ! *outWctp++ = 0; ! *outWctp++ = 0; ! smbp->errLow = (unsigned char) (errCode & 0xff); ! smbp->errHigh = (unsigned char) ((errCode >> 8) & 0xff); ! smbp->rcls = errClass; ! } ! smb_SendPacket(vcp, outp); ! smb_FreePacket(outp); ! } else { ! /* assert that we do not exceed the maximum number of sessions or NCBs. ! * we should probably want to wait for a session to be freed in case ! * we run out. ! */ ! osi_assert(i < Sessionmax - 1); ! osi_assert(numNCBs < NCBmax - 1); /* if we pass this test we can allocate one more */ ! LSNs[i] = ncbp->ncb_lsn; ! lanas[i] = ncbp->ncb_lana_num; ! if (i == numSessions) { ! /* Add new NCB for new session */ ! char eventName[MAX_PATH]; ! ! osi_Log1(smb_logp, "smb_Listener creating new session %d", i); ! ! InitNCBslot(numNCBs); ! numNCBs++; ! thrd_SetEvent(NCBavails[0]); ! thrd_SetEvent(NCBevents[0]); ! for (j = 0; j < smb_NumServerThreads; j++) ! thrd_SetEvent(NCBreturns[j][0]); ! /* Also add new session event */ ! sprintf(eventName, "SessionEvents[%d]", i); ! SessionEvents[i] = thrd_CreateEvent(NULL, FALSE, TRUE, eventName); ! if ( GetLastError() == ERROR_ALREADY_EXISTS ) ! osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName)); ! numSessions++; ! osi_Log2(smb_logp, "increasing numNCBs [ %d ] numSessions [ %d ]", numNCBs, numSessions); ! thrd_SetEvent(SessionEvents[0]); ! } else { ! thrd_SetEvent(SessionEvents[i]); ! } } + + smb_ReleaseVC(vcp); + /* unlock */ lock_ReleaseMutex(&smb_ListenerLock); } /* dispatch while loop */ } *************** *** 7808,7816 **** myTime.tm_sec = 0; smb_localZero = mktime(&myTime); /* Initialize kludge-GMT */ smb_CalculateNowTZ(); ! #ifdef AFS_FREELANCE_CLIENT /* Make sure the root.afs volume has the correct time */ cm_noteLocalMountPointChange(); --- 7877,7886 ---- myTime.tm_sec = 0; smb_localZero = mktime(&myTime); + #ifndef USE_NUMERIC_TIME_CONV /* Initialize kludge-GMT */ smb_CalculateNowTZ(); ! #endif /* USE_NUMERIC_TIME_CONV */ #ifdef AFS_FREELANCE_CLIENT /* Make sure the root.afs volume has the correct time */ cm_noteLocalMountPointChange(); *************** *** 8075,8087 **** ); if (nts != STATUS_SUCCESS && ntsEx != STATUS_SUCCESS) { osi_Log2(smb_logp,"MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x", nts, ntsEx); - OutputDebugString("MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x", - nts, ntsEx); } else { - osi_Log0(smb_logp,"MsV1_0SetProcessOption success"); OutputDebugString("MsV1_0SetProcessOption success"); } /* END - code from Larry */ --- 8145,8159 ---- ); if (nts != STATUS_SUCCESS && ntsEx != STATUS_SUCCESS) { + char message[256]; + sprintf(message,"MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x", + nts, ntsEx); + OutputDebugString(message); osi_Log2(smb_logp,"MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x", nts, ntsEx); } else { OutputDebugString("MsV1_0SetProcessOption success"); + osi_Log0(smb_logp,"MsV1_0SetProcessOption success"); } /* END - code from Larry */ *************** *** 8090,8107 **** smb_lsaLogonOrigin.MaximumLength = smb_lsaLogonOrigin.Length + 1; } else { afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%l]",nts); } } else { afsi_log("Can't register logon process!! NTSTATUS=[%l]",nts); - } - if (nts != STATUS_SUCCESS) { /* something went wrong. We report the error and revert back to no authentication because we can't perform any auth requests without a successful lsa handle or sec package id. */ afsi_log("Reverting to NO SMB AUTH"); smb_authType = SMB_AUTH_NONE; ! } #ifdef COMMENT /* Don't fallback to SMB_AUTH_NTLM. Apparently, allowing SPNEGO to be used each * time prevents the failure of authentication when logged into Windows with an --- 8162,8184 ---- smb_lsaLogonOrigin.MaximumLength = smb_lsaLogonOrigin.Length + 1; } else { afsi_log("Can't determine security package name for NTLM!! NTSTATUS=[%l]",nts); + + /* something went wrong. We report the error and revert back to no authentication + because we can't perform any auth requests without a successful lsa handle + or sec package id. */ + afsi_log("Reverting to NO SMB AUTH"); + smb_authType = SMB_AUTH_NONE; } } else { afsi_log("Can't register logon process!! NTSTATUS=[%l]",nts); /* something went wrong. We report the error and revert back to no authentication because we can't perform any auth requests without a successful lsa handle or sec package id. */ afsi_log("Reverting to NO SMB AUTH"); smb_authType = SMB_AUTH_NONE; ! } ! #ifdef COMMENT /* Don't fallback to SMB_AUTH_NTLM. Apparently, allowing SPNEGO to be used each * time prevents the failure of authentication when logged into Windows with an Index: openafs/src/WINNT/afsd/smb.h diff -c openafs/src/WINNT/afsd/smb.h:1.14.2.10 openafs/src/WINNT/afsd/smb.h:1.14.2.11 *** openafs/src/WINNT/afsd/smb.h:1.14.2.10 Fri Mar 11 13:17:37 2005 --- openafs/src/WINNT/afsd/smb.h Thu Mar 31 18:36:43 2005 *************** *** 440,452 **** extern void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep); ! extern void smb_SearchTimeFromUnixTime(time_t *dosTimep, time_t unixTime); ! extern void smb_UnixTimeFromSearchTime(time_t *unixTimep, time_t searchTime); ! extern void smb_DosUTimeFromUnixTime(time_t *dosUTimep, time_t unixTime); ! extern void smb_UnixTimeFromDosUTime(time_t *unixTimep, time_t dosUTime); extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana); --- 440,454 ---- extern void smb_UnixTimeFromLargeSearchTime(time_t *unixTimep, FILETIME *largeTimep); ! extern void smb_SearchTimeFromUnixTime(afs_uint32 *searchTimep, time_t unixTime); ! extern void smb_UnixTimeFromSearchTime(time_t *unixTimep, afs_uint32 searchTime); ! extern void smb_DosUTimeFromUnixTime(afs_uint32 *dosUTimep, time_t unixTime); ! extern void smb_UnixTimeFromDosUTime(time_t *unixTimep, afs_uint32 dosUTime); ! ! extern void CompensateForSmbClientLastWriteTimeBugs(afs_uint32 *dosTimep); extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana); Index: openafs/src/WINNT/afsd/smb3.c diff -c openafs/src/WINNT/afsd/smb3.c:1.42.2.22 openafs/src/WINNT/afsd/smb3.c:1.42.2.24 *** openafs/src/WINNT/afsd/smb3.c:1.42.2.22 Fri Mar 11 13:17:37 2005 --- openafs/src/WINNT/afsd/smb3.c Thu Mar 31 18:36:43 2005 *************** *** 2065,2071 **** smb_fid_t *fidp; int attributes; char *lastNamep; ! time_t dosTime; int openFun; int trunc; int openMode; --- 2065,2071 ---- smb_fid_t *fidp; int attributes; char *lastNamep; ! afs_uint32 dosTime; int openFun; int trunc; int openMode; *************** *** 2602,2608 **** long smb_ReceiveTran2QPathInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *opx) { smb_tran2Packet_t *outp; ! time_t dosTime; FILETIME ft; unsigned short infoLevel; int nbytesRequired; --- 2602,2608 ---- long smb_ReceiveTran2QPathInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *opx) { smb_tran2Packet_t *outp; ! afs_uint32 dosTime; FILETIME ft; unsigned short infoLevel; int nbytesRequired; *************** *** 3054,3061 **** if (LargeIntegerNotEqualToZero(*((LARGE_INTEGER *)&lastMod)) && lastMod.dwLowDateTime != -1 && lastMod.dwHighDateTime != -1) { attr.mask |= CM_ATTRMASK_CLIENTMODTIME; ! smb_UnixTimeFromLargeSearchTime(&attr.clientModTime, ! &lastMod); fidp->flags |= SMB_FID_MTIMESETDONE; } --- 3054,3060 ---- if (LargeIntegerNotEqualToZero(*((LARGE_INTEGER *)&lastMod)) && lastMod.dwLowDateTime != -1 && lastMod.dwHighDateTime != -1) { attr.mask |= CM_ATTRMASK_CLIENTMODTIME; ! smb_UnixTimeFromLargeSearchTime(&attr.clientModTime, &lastMod); fidp->flags |= SMB_FID_MTIMESETDONE; } *************** *** 3297,3303 **** cm_scache_t *scp; cm_scache_t *targetScp; /* target if scp is a symlink */ char *dptr; ! time_t dosTime; FILETIME ft; int shortTemp; unsigned short attr; --- 3296,3302 ---- cm_scache_t *scp; cm_scache_t *targetScp; /* target if scp is a symlink */ char *dptr; ! afs_uint32 dosTime; FILETIME ft; int shortTemp; unsigned short attr; *************** *** 4499,4505 **** smb_fid_t *fidp; int attributes; char *lastNamep; ! time_t dosTime; int openFun; int trunc; int openMode; --- 4498,4504 ---- smb_fid_t *fidp; int attributes; char *lastNamep; ! afs_uint32 dosTime; int openFun; int trunc; int openMode; *************** *** 4923,4929 **** smb_fid_t *fidp; cm_scache_t *scp; long code = 0; ! time_t searchTime; cm_user_t *userp; cm_req_t req; --- 4922,4928 ---- smb_fid_t *fidp; cm_scache_t *scp; long code = 0; ! afs_uint32 searchTime; cm_user_t *userp; cm_req_t req; *************** *** 4985,4991 **** smb_fid_t *fidp; cm_scache_t *scp; long code = 0; ! time_t searchTime; time_t unixTime; cm_user_t *userp; cm_attr_t attrs; --- 4984,4990 ---- smb_fid_t *fidp; cm_scache_t *scp; long code = 0; ! afs_uint32 searchTime; time_t unixTime; cm_user_t *userp; cm_attr_t attrs; *************** *** 5115,5120 **** --- 5114,5136 ---- #define FILE_OVERWRITE 4 // (open & truncate, but do not create) #define FILE_OVERWRITE_IF 5 // (open & truncate, or create) + /* Flags field */ + #define REQUEST_OPLOCK 2 + #define REQUEST_BATCH_OPLOCK 4 + #define OPEN_DIRECTORY 8 + #define EXTENDED_RESPONSE_REQUIRED 0x10 + + /* CreateOptions field. */ + #define FILE_DIRECTORY_FILE 0x0001 + #define FILE_WRITE_THROUGH 0x0002 + #define FILE_SEQUENTIAL_ONLY 0x0004 + #define FILE_NON_DIRECTORY_FILE 0x0040 + #define FILE_NO_EA_KNOWLEDGE 0x0200 + #define FILE_EIGHT_DOT_THREE_ONLY 0x0400 + #define FILE_RANDOM_ACCESS 0x0800 + #define FILE_DELETE_ON_CLOSE 0x1000 + #define FILE_OPEN_BY_FILE_ID 0x2000 + long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp) { char *pathp, *realPathp; *************** *** 5132,5137 **** --- 5148,5154 ---- unsigned int requestOpLock; unsigned int requestBatchOpLock; unsigned int mustBeDir; + unsigned int extendedRespRequired; unsigned int treeCreate; int realDirFlag; unsigned int desiredAccess; *************** *** 5166,5174 **** nameLength = smb_GetSMBOffsetParm(inp, 2, 1); flags = smb_GetSMBOffsetParm(inp, 3, 1) | (smb_GetSMBOffsetParm(inp, 4, 1) << 16); ! requestOpLock = flags & 0x02; ! requestBatchOpLock = flags & 0x04; ! mustBeDir = flags & 0x08; /* * Why all of a sudden 32-bit FID? --- 5183,5192 ---- nameLength = smb_GetSMBOffsetParm(inp, 2, 1); flags = smb_GetSMBOffsetParm(inp, 3, 1) | (smb_GetSMBOffsetParm(inp, 4, 1) << 16); ! requestOpLock = flags & REQUEST_OPLOCK; ! requestBatchOpLock = flags & REQUEST_BATCH_OPLOCK; ! mustBeDir = flags & OPEN_DIRECTORY; ! extendedRespRequired = flags & EXTENDED_RESPONSE_REQUIRED; /* * Why all of a sudden 32-bit FID? *************** *** 5189,5197 **** /* mustBeDir is never set; createOptions directory bit seems to be * more important */ ! if (createOptions & 1) realDirFlag = 1; ! else if (createOptions & 0x40) realDirFlag = 0; else realDirFlag = -1; --- 5207,5215 ---- /* mustBeDir is never set; createOptions directory bit seems to be * more important */ ! if (createOptions & FILE_DIRECTORY_FILE) realDirFlag = 1; ! else if (createOptions & FILE_NON_DIRECTORY_FILE) realDirFlag = 0; else realDirFlag = -1; *************** *** 5418,5424 **** } } while (dscp == NULL && code == 0); } else ! code = 0; /* we might have scp and we might have dscp */ --- 5436,5442 ---- } } while (dscp == NULL && code == 0); } else ! code = 0; /* we might have scp and we might have dscp */ *************** *** 5847,5856 **** lparmp = (ULONG *) parmp; flags = lparmp[0]; ! requestOpLock = flags & 0x02; ! requestBatchOpLock = flags & 0x04; ! mustBeDir = flags & 0x08; ! extendedRespRequired = flags & 0x10; /* * Why all of a sudden 32-bit FID? --- 5865,5874 ---- lparmp = (ULONG *) parmp; flags = lparmp[0]; ! requestOpLock = flags & REQUEST_OPLOCK; ! requestBatchOpLock = flags & REQUEST_BATCH_OPLOCK; ! mustBeDir = flags & OPEN_DIRECTORY; ! extendedRespRequired = flags & EXTENDED_RESPONSE_REQUIRED; /* * Why all of a sudden 32-bit FID? *************** *** 5883,5891 **** /* mustBeDir is never set; createOptions directory bit seems to be * more important */ ! if (createOptions & 1) realDirFlag = 1; ! else if (createOptions & 0x40) realDirFlag = 0; else realDirFlag = -1; --- 5901,5909 ---- /* mustBeDir is never set; createOptions directory bit seems to be * more important */ ! if (createOptions & FILE_DIRECTORY_FILE) realDirFlag = 1; ! else if (createOptions & FILE_NON_DIRECTORY_FILE) realDirFlag = 0; else realDirFlag = -1; Index: openafs/src/afs/Makefile.in diff -c openafs/src/afs/Makefile.in:1.19 openafs/src/afs/Makefile.in:1.19.2.1 *** openafs/src/afs/Makefile.in:1.19 Tue Jun 1 22:40:05 2004 --- openafs/src/afs/Makefile.in Fri Mar 25 19:45:34 2005 *************** *** 35,41 **** /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* | *_umlinux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ ! *_darwin_* | i386_fbsd*) \ echo No gencat for ${SYS_NAME} ;; \ * ) \ gencat afszcm.cat afs_trace.msf ;; \ --- 35,43 ---- /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* | *_umlinux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ ! *_darwin_* ) \ ! gencat -new afszcm.cat afs_trace.msf ;; \ ! i386_fbsd*) \ echo No gencat for ${SYS_NAME} ;; \ * ) \ gencat afszcm.cat afs_trace.msf ;; \ Index: openafs/src/afs/afs.h diff -c openafs/src/afs/afs.h:1.48.2.10 openafs/src/afs/afs.h:1.48.2.14 *** openafs/src/afs/afs.h:1.48.2.10 Sun Feb 20 20:15:34 2005 --- openafs/src/afs/afs.h Mon Apr 4 03:43:20 2005 *************** *** 29,35 **** * Macros to uniquely identify the AFS vfs struct */ #define AFS_VFSMAGIC 0x1234 ! #if defined(AFS_SUN_ENV) || defined(AFS_HPUX90_ENV) || defined(AFS_LINUX20_ENV) #define AFS_VFSFSID 99 #else #if defined(AFS_SGI_ENV) --- 29,35 ---- * Macros to uniquely identify the AFS vfs struct */ #define AFS_VFSMAGIC 0x1234 ! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX90_ENV) || defined(AFS_LINUX20_ENV) #define AFS_VFSFSID 99 #else #if defined(AFS_SGI_ENV) *************** *** 43,49 **** #if defined(AFS_HPUX102_ENV) #define AFS_FLOCK k_flock #else ! #if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV) && !defined(AFS_IA64_LINUX26_ENV) && !defined(AFS_S390X_LINUX26_ENV)) #define AFS_FLOCK flock64 #else #define AFS_FLOCK flock --- 43,49 ---- #if defined(AFS_HPUX102_ENV) #define AFS_FLOCK k_flock #else ! #if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV) && !defined(AFS_IA64_LINUX26_ENV) && !defined(AFS_S390X_LINUX26_ENV) && !defined(AFS_ALPHA_LINUX26_ENV)) #define AFS_FLOCK flock64 #else #define AFS_FLOCK flock *************** *** 551,557 **** #define VPageCleaning 0x2 /* Solaris - Cache Trunc Daemon sez keep out */ #define CPSIZE 2 ! #if defined(AFS_XBSD_ENV) #define vrefCount v->v_usecount #else #define vrefCount v.v_count --- 551,557 ---- #define VPageCleaning 0x2 /* Solaris - Cache Trunc Daemon sez keep out */ #define CPSIZE 2 ! #if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) #define vrefCount v->v_usecount #else #define vrefCount v.v_count *************** *** 594,600 **** extern afs_uint32 afs_stampValue; /* stamp for pair's usage */ #define MakeStamp() (++afs_stampValue) ! #if defined(AFS_XBSD_ENV) #define VTOAFS(v) ((struct vcache *)(v)->v_data) #define AFSTOV(vc) ((vc)->v) #else --- 594,600 ---- extern afs_uint32 afs_stampValue; /* stamp for pair's usage */ #define MakeStamp() (++afs_stampValue) ! #if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) #define VTOAFS(v) ((struct vcache *)(v)->v_data) #define AFSTOV(vc) ((vc)->v) #else *************** *** 612,618 **** * !(avc->nextfree) && !avc->vlruq.next => (FreeVCList == avc->nextfree) */ struct vcache { ! #if defined(AFS_XBSD_ENV) struct vnode *v; #else struct vnode v; /* Has reference count in v.v_count */ --- 612,618 ---- * !(avc->nextfree) && !avc->vlruq.next => (FreeVCList == avc->nextfree) */ struct vcache { ! #if defined(AFS_XBSD_ENV)||defined(AFS_DARWIN_ENV) struct vnode *v; #else struct vnode v; /* Has reference count in v.v_count */ *************** *** 641,647 **** krwlock_t rwlock; struct cred *credp; #endif ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) afs_bozoLock_t pvnLock; /* see locks.x */ #endif #ifdef AFS_AIX32_ENV --- 641,647 ---- krwlock_t rwlock; struct cred *credp; #endif ! #ifdef AFS_BOZONLOCK_ENV afs_bozoLock_t pvnLock; /* see locks.x */ #endif #ifdef AFS_AIX32_ENV *************** *** 904,909 **** --- 904,926 ---- #endif #endif + struct buffer { + afs_int32 fid; /* is adc->index, the cache file number */ + afs_inode_t inode; /* is adc->f.inode, the inode number of the cac\ + he file */ + afs_int32 page; + afs_int32 accesstime; + struct buffer *hashNext; + char *data; + char lockers; + char dirty; + char hashIndex; + #if AFS_USEBUFFERS + struct buf *bufp; + #endif + afs_rwlock_t lock; /* the lock for this structure */ + }; + /* kept on disk and in dcache entries */ struct fcache { struct VenusFid fid; /* Fid for this file */ *************** *** 971,976 **** --- 988,1001 ---- /* this is obsolete and should be removed */ #define ihint stamp + /* afs_memcache.c */ + struct memCacheEntry { + int size; /* # of valid bytes in this entry */ + int dataSize; /* size of allocated data area */ + afs_lock_t afs_memLock; + char *data; /* bytes */ + }; + /* macro to mark a dcache entry as bad */ #define ZapDCE(x) \ do { \ *************** *** 1187,1216 **** extern int afs_fakestat_enable; - struct buffer { - afs_int32 fid; /* is adc->index, the cache file number */ - afs_inode_t inode; /* is adc->f.inode, the inode number of the cache file */ - afs_int32 page; - afs_int32 accesstime; - struct buffer *hashNext; - char *data; - char lockers; - char dirty; - char hashIndex; - #if AFS_USEBUFFERS - struct buf *bufp; - #endif - afs_rwlock_t lock; /* the lock for this structure */ - }; - - /* afs_memcache.c */ - struct memCacheEntry { - int size; /* # of valid bytes in this entry */ - int dataSize; /* size of allocated data area */ - afs_lock_t afs_memLock; - char *data; /* bytes */ - }; - /* First 32 bits of capabilities */ #define CAPABILITY_ERRORTRANS (1<<0) --- 1212,1217 ---- Index: openafs/src/afs/afs_buffer.c diff -c openafs/src/afs/afs_buffer.c:1.16.2.3 openafs/src/afs/afs_buffer.c:1.16.2.4 *** openafs/src/afs/afs_buffer.c:1.16.2.3 Sun Jan 30 23:18:41 2005 --- openafs/src/afs/afs_buffer.c Sun Apr 3 14:15:35 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.16.2.3 2005/01/31 04:18:41 shadow Exp $"); #include "afs/sysincludes.h" #include "afsincludes.h" --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.16.2.4 2005/04/03 18:15:35 shadow Exp $"); #include "afs/sysincludes.h" #include "afsincludes.h" *************** *** 19,25 **** #include "h/param.h" #include "h/types.h" #include "h/time.h" ! #if defined(AFS_AIX31_ENV) || defined(AFS_DEC_ENV) #include "h/limits.h" #endif #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) --- 19,25 ---- #include "h/param.h" #include "h/types.h" #include "h/time.h" ! #if defined(AFS_AIX31_ENV) #include "h/limits.h" #endif #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) Index: openafs/src/afs/afs_call.c diff -c openafs/src/afs/afs_call.c:1.74.2.6 openafs/src/afs/afs_call.c:1.74.2.7 *** openafs/src/afs/afs_call.c:1.74.2.6 Sun Mar 20 09:54:11 2005 --- openafs/src/afs/afs_call.c Sun Apr 3 14:15:35 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.6 2005/03/20 14:54:11 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.7 2005/04/03 18:15:35 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ *************** *** 31,37 **** #endif ! #if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) #define AFS_MINBUFFERS 100 #else #define AFS_MINBUFFERS 50 --- 31,37 ---- #endif ! #if defined(AFS_SUN5_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) #define AFS_MINBUFFERS 100 #else #define AFS_MINBUFFERS 50 *************** *** 505,511 **** while (!afs_InitSetup_done) afs_osi_Sleep(&afs_InitSetup_done); ! #if defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) temp = AFS_MINBUFFERS; /* Should fix this soon */ #else /* number of 2k buffers we could get from all of the buffer space */ --- 505,511 ---- while (!afs_InitSetup_done) afs_osi_Sleep(&afs_InitSetup_done); ! #if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SUN5_ENV) temp = AFS_MINBUFFERS; /* Should fix this soon */ #else /* number of 2k buffers we could get from all of the buffer space */ *************** *** 694,700 **** afs_initState = 101; afs_setTime = parm2; afs_osi_Wakeup(&afs_initState); ! #if (!defined(AFS_NONFSTRANS) && !defined(AFS_DEC_ENV)) || defined(AFS_AIX_IAUTH_ENV) afs_nfsclient_init(); #endif printf("found %d non-empty cache files (%d%%).\n", --- 694,700 ---- afs_initState = 101; afs_setTime = parm2; afs_osi_Wakeup(&afs_initState); ! #if (!defined(AFS_NONFSTRANS)) || defined(AFS_AIX_IAUTH_ENV) afs_nfsclient_init(); #endif printf("found %d non-empty cache files (%d%%).\n", *************** *** 1276,1286 **** } *uap = (struct a *)u.u_ap; #else /* UKERNEL */ int - #if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) - afs_syscall() - #else Afs_syscall() - #endif /* SUN && !SUN5 */ { register struct a { long syscall; --- 1276,1282 ---- *************** *** 1292,1300 **** long parm6; } *uap = (struct a *)u.u_ap; #endif /* UKERNEL */ ! #if defined(AFS_DEC_ENV) ! int *retval = &u.u_r.r_val1; ! #elif defined(AFS_HPUX_ENV) long *retval = &u.u_rval1; #else int *retval = &u.u_rval1; --- 1288,1294 ---- long parm6; } *uap = (struct a *)u.u_ap; #endif /* UKERNEL */ ! #if defined(AFS_HPUX_ENV) long *retval = &u.u_rval1; #else int *retval = &u.u_rval1; *************** *** 1632,1642 **** shutdown_vfsops(); shutdown_exporter(); shutdown_memcache(); ! #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV) ! #if !defined(AFS_DEC_ENV) && !defined(AFS_OSF_ENV) ! /* this routine does not exist in Ultrix systems... 93.01.19 */ shutdown_nfsclnt(); - #endif /* AFS_DEC_ENV */ #endif shutdown_afstest(); /* The following hold the cm stats */ --- 1626,1633 ---- shutdown_vfsops(); shutdown_exporter(); shutdown_memcache(); ! #if (!defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)) && !defined(AFS_OSF_ENV) shutdown_nfsclnt(); #endif shutdown_afstest(); /* The following hold the cm stats */ *************** *** 1671,1677 **** } ! #if defined(AFS_ALPHA_ENV) || defined(AFS_SGI61_ENV) /* For SGI 6.2, this can is changed to 1 if it's a 32 bit kernel. */ #if defined(AFS_SGI62_ENV) && defined(KERNEL) && !defined(_K64U64) int afs_icl_sizeofLong = 1; --- 1662,1668 ---- } ! #if defined(AFS_OSF_ENV) || defined(AFS_SGI61_ENV) /* For SGI 6.2, this can is changed to 1 if it's a 32 bit kernel. */ #if defined(AFS_SGI62_ENV) && defined(KERNEL) && !defined(_K64U64) int afs_icl_sizeofLong = 1; *************** *** 2106,2121 **** (lp)->logElements++; \ MACRO_END ! #if defined(AFS_ALPHA_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) #define ICL_APPENDLONG(lp, x) \ MACRO_BEGIN \ ICL_APPENDINT32((lp), ((x) >> 32) & 0xffffffffL); \ ICL_APPENDINT32((lp), (x) & 0xffffffffL); \ MACRO_END ! #else /* AFS_ALPHA_ENV */ #define ICL_APPENDLONG(lp, x) ICL_APPENDINT32((lp), (x)) ! #endif /* AFS_ALPHA_ENV */ /* routine to tell whether we're dealing with the address or the * object itself --- 2097,2112 ---- (lp)->logElements++; \ MACRO_END ! #if defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) #define ICL_APPENDLONG(lp, x) \ MACRO_BEGIN \ ICL_APPENDINT32((lp), ((x) >> 32) & 0xffffffffL); \ ICL_APPENDINT32((lp), (x) & 0xffffffffL); \ MACRO_END ! #else /* AFS_OSF_ENV */ #define ICL_APPENDLONG(lp, x) ICL_APPENDINT32((lp), (x)) ! #endif /* AFS_OSF_ENV */ /* routine to tell whether we're dealing with the address or the * object itself *************** *** 2260,2269 **** ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[3]); } ! #if defined(AFS_ALPHA_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t1 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p1); ! #endif /* AFS_ALPHA_ENV */ else ICL_APPENDLONG(logp, p1); } --- 2251,2260 ---- ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[3]); } ! #if defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t1 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p1); ! #endif /* AFS_OSF_ENV */ else ICL_APPENDLONG(logp, p1); } *************** *** 2300,2309 **** ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[3]); } ! #if defined(AFS_ALPHA_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t2 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p2); ! #endif /* AFS_ALPHA_ENV */ else ICL_APPENDLONG(logp, p2); } --- 2291,2300 ---- ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[3]); } ! #if defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t2 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p2); ! #endif /* AFS_OSF_ENV */ else ICL_APPENDLONG(logp, p2); } *************** *** 2340,2349 **** ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[3]); } ! #if defined(AFS_ALPHA_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t3 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p3); ! #endif /* AFS_ALPHA_ENV */ else ICL_APPENDLONG(logp, p3); } --- 2331,2340 ---- ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[3]); } ! #if defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t3 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p3); ! #endif /* AFS_OSF_ENV */ else ICL_APPENDLONG(logp, p3); } *************** *** 2380,2389 **** ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[3]); } ! #if defined(AFS_ALPHA_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t4 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p4); ! #endif /* AFS_ALPHA_ENV */ else ICL_APPENDLONG(logp, p4); } --- 2371,2380 ---- ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[2]); ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[3]); } ! #if defined(AFS_OSF_ENV) || (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) else if (t4 == ICL_TYPE_INT32) ICL_APPENDINT32(logp, (afs_int32) p4); ! #endif /* AFS_OSF_ENV */ else ICL_APPENDLONG(logp, p4); } Index: openafs/src/afs/afs_daemons.c diff -c openafs/src/afs/afs_daemons.c:1.28.2.3 openafs/src/afs/afs_daemons.c:1.28.2.5 *** openafs/src/afs/afs_daemons.c:1.28.2.3 Fri Mar 11 01:50:31 2005 --- openafs/src/afs/afs_daemons.c Sun Apr 3 14:18:54 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.3 2005/03/11 06:50:31 shadow Exp $"); #ifdef AFS_AIX51_ENV #define __FULL_PROTO --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.5 2005/04/03 18:18:54 shadow Exp $"); #ifdef AFS_AIX51_ENV #define __FULL_PROTO *************** *** 145,166 **** afs_FlushVCBs(1); /* flush queued callbacks */ afs_MaybeWakeupTruncateDaemon(); /* free cache space if have too */ rx_CheckPackets(); /* Does RX need more packets? */ - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - /* - * Hack: We always want to make sure there are plenty free - * entries in the small free pool so that we don't have to - * worry about rx (with disabled interrupts) to have to call - * malloc). So we do the dummy call below... - */ - if (((afs_stats_cmperf.SmallBlocksAlloced - - afs_stats_cmperf.SmallBlocksActive) - <= AFS_SALLOC_LOW_WATER)) - osi_FreeSmallSpace(osi_AllocSmallSpace(AFS_SMALLOCSIZ)); - if (((afs_stats_cmperf.MediumBlocksAlloced - - afs_stats_cmperf.MediumBlocksActive) - <= AFS_MALLOC_LOW_WATER + 50)) - osi_AllocMoreMSpace(AFS_MALLOC_LOW_WATER * 2); - #endif now = osi_Time(); if (lastCBSlotBump + CBHTSLOTLEN < now) { /* pretty time-dependant */ --- 145,150 ---- *************** *** 338,366 **** afs_osi_Wakeup(&afs_initState); afs_PutVolume(tvp, READ_LOCK); } - #ifdef AFS_DEC_ENV - /* This is to make sure that we update the root gnode */ - /* every time root volume gets released */ - { - struct gnode *rootgp; - struct mount *mp; - int code; - - /* Only do this if afs_globalVFS is properly set due to race conditions - * this routine could be called before the gfs_mount is performed! - * Furthermore, afs_root (called below) *waits* until - * initState >= 200, so we don't try this until we've gotten - * at least that far */ - if (afs_globalVFS && afs_initState >= 200) { - if (code = afs_root(afs_globalVFS, &rootgp)) - return code; - mp = (struct mount *)afs_globalVFS->vfs_data; - mp->m_rootgp = gget(mp, 0, 0, (char *)rootgp); - afs_unlock(mp->m_rootgp); /* unlock basic gnode */ - afs_vrele(VTOAFS(rootgp)); /* zap afs_root's vnode hold */ - } - } - #endif if (afs_rootFid.Fid.Volume) return 0; else --- 322,327 ---- *************** *** 400,436 **** if (!tvn || !IsAfsVnode(tvn)) { /* release it and give up */ if (tvn) { - #ifdef AFS_DEC_ENV - grele(tvn); - #else #ifdef AFS_LINUX22_ENV dput(dp); #else AFS_RELE(tvn); #endif - #endif } return; } - #ifdef AFS_DEC_ENV - tvc = VTOAFS(afs_gntovn(tvn)); - #else tvc = VTOAFS(tvn); - #endif /* here we know its an afs vnode, so we can get the data for the chunk */ tdc = afs_GetDCache(tvc, ab->size_parm[0], &treq, &offset, &len, 1); if (tdc) { afs_PutDCache(tdc); } - #ifdef AFS_DEC_ENV - grele(tvn); - #else #ifdef AFS_LINUX22_ENV dput(dp); #else AFS_RELE(tvn); #endif - #endif } /* size_parm 0 to the fetch is the chunk number, --- 361,385 ---- *************** *** 570,580 **** tb->cred = acred; crhold(tb->cred); if (avc) { - #ifdef AFS_DEC_ENV - avc->vrefCount++; - #else VN_HOLD(AFSTOV(avc)); - #endif } tb->refCount = ause + 1; tb->size_parm[0] = asparm0; --- 519,525 ---- *************** *** 1295,1305 **** else panic("background bop"); if (tb->vc) { - #ifdef AFS_DEC_ENV - tb->vc->vrefCount--; /* fix up reference count */ - #else AFS_RELE(AFSTOV(tb->vc)); /* MUST call vnode layer or could lose vnodes */ - #endif tb->vc = NULL; } if (tb->cred) { --- 1240,1246 ---- Index: openafs/src/afs/afs_dcache.c diff -c openafs/src/afs/afs_dcache.c:1.42.2.9 openafs/src/afs/afs_dcache.c:1.42.2.10 *** openafs/src/afs/afs_dcache.c:1.42.2.9 Sun Mar 20 15:09:13 2005 --- openafs/src/afs/afs_dcache.c Sun Apr 3 14:15:35 2005 *************** *** 14,20 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.9 2005/03/20 20:09:13 shadow Exp $"); #include "afs/sysincludes.h" /*Standard vendor system headers */ #include "afsincludes.h" /*AFS-based standard headers */ --- 14,20 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.10 2005/04/03 18:15:35 shadow Exp $"); #include "afs/sysincludes.h" /*Standard vendor system headers */ #include "afsincludes.h" /*AFS-based standard headers */ *************** *** 625,633 **** ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32, 3, ICL_TYPE_INT32, tdc->index, ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(tchunkoffset)); - #ifndef AFS_DEC_ENV AFS_STATCNT(afs_gget); - #endif afs_HashOutDCache(tdc); if (tdc->f.chunkBytes != 0) { discard = 1; --- 625,631 ---- *************** *** 682,690 **** { int i, us; - #ifndef AFS_DEC_ENV AFS_STATCNT(afs_glink); - #endif /* we know this guy's in the LRUQ. We'll move dude into DCQ below */ DZap(adc); /* if this guy is in the hash table, pull him out */ --- 680,686 ---- *************** *** 1857,1863 **** #endif /* AFS_SGI_ENV */ if (AFS_CHUNKTOBASE(chunk) + adjustsize >= avc->m.Length && #else /* defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV) */ ! #if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) if ((doAdjustSize || (AFS_CHUNKTOBASE(chunk) >= avc->m.Length)) && #else if (AFS_CHUNKTOBASE(chunk) >= avc->m.Length && --- 1853,1859 ---- #endif /* AFS_SGI_ENV */ if (AFS_CHUNKTOBASE(chunk) + adjustsize >= avc->m.Length && #else /* defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV) */ ! #if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) if ((doAdjustSize || (AFS_CHUNKTOBASE(chunk) >= avc->m.Length)) && #else if (AFS_CHUNKTOBASE(chunk) >= avc->m.Length && *************** *** 3025,3035 **** dput(filevp); #else tdc->f.inode = afs_vnodeToInumber(filevp); - #ifdef AFS_DEC_ENV - grele(filevp); - #else AFS_RELE(filevp); - #endif #endif /* AFS_LINUX22_ENV */ } else { tdc->f.inode = ainode; --- 3021,3027 ---- Index: openafs/src/afs/afs_init.c diff -c openafs/src/afs/afs_init.c:1.28.2.2 openafs/src/afs/afs_init.c:1.28.2.4 *** openafs/src/afs/afs_init.c:1.28.2.2 Fri Mar 11 01:50:31 2005 --- openafs/src/afs/afs_init.c Sun Apr 3 14:18:54 2005 *************** *** 17,23 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.2 2005/03/11 06:50:31 shadow Exp $"); #include "afs/stds.h" #include "afs/sysincludes.h" /* Standard vendor system headers */ --- 17,23 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.4 2005/04/03 18:18:54 shadow Exp $"); #include "afs/stds.h" #include "afs/sysincludes.h" /* Standard vendor system headers */ *************** *** 27,33 **** /* Exported variables */ struct osi_dev cacheDev; /*Cache device */ afs_int32 cacheInfoModTime; /*Last time cache info modified */ ! #if defined(AFS_OSF_ENV) || defined(AFS_DEC_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) struct mount *afs_cacheVfsp = 0; #elif defined(AFS_LINUX20_ENV) struct super_block *afs_cacheSBp = 0; --- 27,33 ---- /* Exported variables */ struct osi_dev cacheDev; /*Cache device */ afs_int32 cacheInfoModTime; /*Last time cache info modified */ ! #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) struct mount *afs_cacheVfsp = 0; #elif defined(AFS_LINUX20_ENV) struct super_block *afs_cacheSBp = 0; *************** *** 111,136 **** RWLOCK_INIT(&afs_xaxs, "afs_xaxs"); osi_dnlc_init(); - - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - { - afs_int32 preallocs; - - /* - * We want to also reserve space for the gnode struct which is associated - * with each vnode (vcache) one; we want to use the pinned pool for them - * since they're referenced at interrupt level. - */ - if (afs_stats_cmperf.SmallBlocksAlloced + astatSize < 3600) - preallocs = astatSize; - else { - preallocs = 3600 - afs_stats_cmperf.SmallBlocksAlloced; - if (preallocs <= 0) - preallocs = 10; - } - osi_AllocMoreSSpace(preallocs); - } - #endif /* * create volume list structure */ --- 111,116 ---- *************** *** 251,261 **** if (fvpp) *fvpp = filevp; else { - #if defined(AFS_DEC_ENV) - grele(filevp); - #else AFS_RELE(filevp); - #endif } #endif /* AFS_LINUX22_ENV */ --- 231,237 ---- *************** *** 492,500 **** RWLOCK_INIT(&afs_xinterface, "afs_xinterface"); LOCK_INIT(&afs_puttofileLock, "afs_puttofileLock"); #ifndef AFS_FBSD_ENV - #ifndef AFS_AIX32_ENV LOCK_INIT(&osi_fsplock, "osi_fsplock"); - #endif LOCK_INIT(&osi_flplock, "osi_flplock"); #endif RWLOCK_INIT(&afs_xconn, "afs_xconn"); --- 468,474 ---- *************** *** 511,525 **** afs_sysname = afs_sysnamelist[0]; strcpy(afs_sysname, SYS_NAME); afs_sysnamecount = 1; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - { - - if ((preallocs > 256) && (preallocs < 3600)) - afs_preallocs = preallocs; - osi_AllocMoreSSpace(afs_preallocs); - osi_AllocMoreMSpace(100); - } - #endif } secobj = rxnull_NewServerSecurityObject(); --- 485,490 ---- *************** *** 691,697 **** void shutdown_vnodeops(void) { ! #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) struct buf *afs_bread_freebp = 0; #endif --- 656,662 ---- void shutdown_vnodeops(void) { ! #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV) struct buf *afs_bread_freebp = 0; #endif *************** *** 704,710 **** #ifndef AFS_LINUX20_ENV afs_rd_stash_i = 0; #endif ! #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) afs_bread_freebp = 0; #endif shutdown_mariner(); --- 669,675 ---- #ifndef AFS_LINUX20_ENV afs_rd_stash_i = 0; #endif ! #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV) afs_bread_freebp = 0; #endif shutdown_mariner(); Index: openafs/src/afs/afs_memcache.c diff -c openafs/src/afs/afs_memcache.c:1.15.2.2 openafs/src/afs/afs_memcache.c:1.15.2.3 *** openafs/src/afs/afs_memcache.c:1.15.2.2 Sun Feb 20 20:15:21 2005 --- openafs/src/afs/afs_memcache.c Sun Apr 3 14:15:36 2005 *************** *** 11,29 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.2 2005/02/21 01:15:21 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #ifndef AFS_LINUX22_ENV #include "rpc/types.h" #endif ! #ifdef AFS_ALPHA_ENV #undef kmem_alloc #undef kmem_free #undef mem_alloc #undef mem_free #undef register ! #endif /* AFS_ALPHA_ENV */ #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* statistics */ --- 11,29 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.3 2005/04/03 18:15:36 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #ifndef AFS_LINUX22_ENV #include "rpc/types.h" #endif ! #ifdef AFS_OSF_ENV #undef kmem_alloc #undef kmem_free #undef mem_alloc #undef mem_free #undef register ! #endif /* AFS_OSF_ENV */ #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* statistics */ Index: openafs/src/afs/afs_nfsclnt.c diff -c openafs/src/afs/afs_nfsclnt.c:1.12 openafs/src/afs/afs_nfsclnt.c:1.12.2.1 *** openafs/src/afs/afs_nfsclnt.c:1.12 Wed Mar 17 01:43:34 2004 --- openafs/src/afs/afs_nfsclnt.c Sun Apr 3 14:15:36 2005 *************** *** 11,20 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12 2004/03/17 06:43:34 shadow Exp $"); #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV) - #ifndef AFS_DEC_ENV #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* statistics */ --- 11,19 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12.2.1 2005/04/03 18:15:36 shadow Exp $"); #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV) #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* statistics */ *************** *** 460,469 **** shutdown_nfsclnt() { - #if 0 - extern int afs_allnfsreqs, afs_nfscalls; - #endif - #if defined(AFS_SGIMP_ENV) osi_Assert(ISAFS_GLOCK()); #endif --- 459,464 ---- *************** *** 473,482 **** #endif afs_nfsclient_GC(afs_nfsexporter, -1); init_nfsexporter = 0; - #if 0 - /* The following are for the nfs/afs server */ - afs_allnfsreqs = afs_nfscalls = 0; - #endif } - #endif /* AFS_DEC_ENV */ #endif /* AFS_NONFSTRANS */ --- 468,472 ---- Index: openafs/src/afs/afs_osi.c diff -c openafs/src/afs/afs_osi.c:1.48.2.3 openafs/src/afs/afs_osi.c:1.48.2.4 *** openafs/src/afs/afs_osi.c:1.48.2.3 Sun Jan 30 23:25:32 2005 --- openafs/src/afs/afs_osi.c Sun Apr 3 14:15:36 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.3 2005/01/31 04:25:32 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.4 2005/04/03 18:15:36 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ *************** *** 98,110 **** osi_Active(register struct vcache *avc) { AFS_STATCNT(osi_Active); ! #if defined(AFS_SUN_ENV) || defined(AFS_AIX_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) if ((avc->opens > 0) || (avc->states & CMAPPED)) return 1; /* XXX: Warning, verify this XXX */ - #elif defined(AFS_MACH_ENV) - if (avc->opens > 0 - || ((avc->v.v_flag & VTEXT) && !inode_uncache_try(avc))) - return 1; #elif defined(AFS_SGI_ENV) if ((avc->opens > 0) || AFS_VN_MAPPED(AFSTOV(avc))) return 1; --- 98,106 ---- osi_Active(register struct vcache *avc) { AFS_STATCNT(osi_Active); ! #if defined(AFS_AIX_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) if ((avc->opens > 0) || (avc->states & CMAPPED)) return 1; /* XXX: Warning, verify this XXX */ #elif defined(AFS_SGI_ENV) if ((avc->opens > 0) || AFS_VN_MAPPED(AFSTOV(avc))) return 1; *************** *** 189,202 **** if (hcmp(vp->m.DataVersion, vp->flushDV) <= 0) return; - #ifdef AFS_DEC_ENV - { - void afs_gfs_FlushText(); - afs_gfs_FlushText(vp); - return; - } - #else - MObtainWriteLock(&afs_ftf, 317); hset(fdv, vp->m.DataVersion); --- 185,190 ---- *************** *** 239,298 **** hset(vp->flushDV, fdv); MReleaseWriteLock(&afs_ftf); - #endif /* AFS_DEC_ENV */ } - - #ifdef AFS_DEC_ENV - /* I don't really like using xinval() here, because it kills processes - * a bit aggressively. Previous incarnations of this functionality - * used to use xrele() instead of xinval, and didn't invoke - * cacheinval(). But they would panic. So it might be worth looking - * into some middle ground... - */ - static void - afs_gfs_FlushText(register struct vcache *vp) - { - afs_hyper_t fdv; /* version before which we'll flush */ - register struct text *xp; - struct gnode *gp; - - MObtainWriteLock(&afs_ftf, 318); - hset(fdv, vp->m.DataVersion); - gp = afs_vntogn(vp); - - if (!gp) { - /* this happens frequently after cores are created. */ - MReleaseWriteLock(&afs_ftf); - return; - } - - if (gp->g_flag & GTEXT) { - if (gp->g_textp) { - xp = (struct text *)gp->g_textp; - /* if text object is locked, give up */ - if (xp && (xp->x_flag & XLOCK)) { - MReleaseWriteLock(&afs_ftf); - return; - } - } else - xp = NULL; - - if (gp->g_flag & GTEXT) { /* still has a text object? */ - xinval(gp); - } - } - - /* next do the stuff that need not check for deadlock problems */ - /* maybe xinval(gp); here instead of above */ - binval(NODEV, gp); - cacheinval(gp); - /* finally, record that we've done it */ - hset(vp->flushDV, fdv); - - MReleaseWriteLock(&afs_ftf); - } - #endif /* AFS_DEC_ENV */ - #endif /* AFS_TEXT_ENV */ /* mask signals in afsds */ --- 227,233 ---- *************** *** 345,352 **** { #ifdef AFS_LINUX22_ENV afs_osi_MaskSignals(); - #elif defined(AFS_DEC_ENV) - u.u_procp->p_type |= SSYS; #elif defined(AFS_SUN5_ENV) curproc->p_flag |= SSYS; #elif defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV) --- 280,285 ---- *************** *** 465,471 **** #else size = x; tm = (struct osimem *)AFS_KALLOC(size); ! #ifdef AFS_SUN_ENV if (!tm) osi_Panic("osi_Alloc: Couldn't allocate %d bytes; out of memory!\n", size); --- 398,404 ---- #else size = x; tm = (struct osimem *)AFS_KALLOC(size); ! #ifdef AFS_SUN5_ENV if (!tm) osi_Panic("osi_Alloc: Couldn't allocate %d bytes; out of memory!\n", size); *************** *** 474,480 **** #endif } ! #if defined(AFS_SUN_ENV) || defined(AFS_SGI_ENV) void * afs_osi_Alloc_NoSleep(size_t x) --- 407,413 ---- #endif } ! #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) void * afs_osi_Alloc_NoSleep(size_t x) *************** *** 577,583 **** #endif #endif /* AFS_AIX32_ENV */ ! #if defined (AFS_SUN_ENV) if (avc->states & CMAPPED) { struct page *pg; for (pg = avc->v.v_s.v_Pages; pg; pg = pg->p_vpnext) { --- 510,516 ---- #endif #endif /* AFS_AIX32_ENV */ ! #if defined (AFS_SUN5_ENV) if (avc->states & CMAPPED) { struct page *pg; for (pg = avc->v.v_s.v_Pages; pg; pg = pg->p_vpnext) { Index: openafs/src/afs/afs_osi.h diff -c openafs/src/afs/afs_osi.h:1.22.2.3 openafs/src/afs/afs_osi.h:1.22.2.4 *** openafs/src/afs/afs_osi.h:1.22.2.3 Fri Mar 11 01:50:31 2005 --- openafs/src/afs/afs_osi.h Mon Apr 4 00:01:14 2005 *************** *** 119,124 **** --- 119,134 ---- /* * Vnode related macros */ + #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) + #define vSetVfsp(vc, vfsp) AFSTOV(vc)->v_mount = (vfsp) + #define vSetType(vc, type) AFSTOV(vc)->v_type = (type) + #define vType(vc) AFSTOV(vc)->v_type + #else + #define vType(vc) (vc)->v.v_type + #define vSetType(vc,type) (vc)->v.v_type = (type) + #define vSetVfsp(vc,vfsp) (vc)->v.v_vfsp = (vfsp) + #endif + #ifndef AFS_OBSD_ENV #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) extern int (**afs_vnodeop_p) (); *************** *** 129,137 **** #define IsAfsVnode(vc) ((vc)->v_op == afs_ops) #define SetAfsVnode(vc) (vc)->v_op = afs_ops #endif - #define vType(vc) (vc)->v.v_type - #define vSetType(vc,type) (vc)->v.v_type = (type) - #define vSetVfsp(vc,vfsp) (vc)->v.v_vfsp = (vfsp) #endif #ifdef AFS_SGI65_ENV --- 139,144 ---- Index: openafs/src/afs/afs_osi_alloc.c diff -c openafs/src/afs/afs_osi_alloc.c:1.10 openafs/src/afs/afs_osi_alloc.c:1.10.2.1 *** openafs/src/afs/afs_osi_alloc.c:1.10 Wed Mar 10 18:01:51 2004 --- openafs/src/afs/afs_osi_alloc.c Sun Apr 3 14:18:54 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_osi_alloc.c,v 1.10 2004/03/10 23:01:51 rees Exp $"); --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_osi_alloc.c,v 1.10.2.1 2005/04/03 18:18:54 shadow Exp $"); *************** *** 20,35 **** #include "afs/afs_stats.h" /* afs statistics */ #ifndef AFS_FBSD_ENV #ifdef AFS_AIX41_ENV #include "sys/lockl.h" #include "sys/sleep.h" #include "sys/syspest.h" #include "sys/lock_def.h" /*lock_t osi_fsplock = LOCK_AVAIL;*/ - #else - afs_lock_t osi_fsplock; #endif static struct osi_packet { --- 20,36 ---- #include "afs/afs_stats.h" /* afs statistics */ #ifndef AFS_FBSD_ENV + #ifdef AFS_AIX41_ENV #include "sys/lockl.h" #include "sys/sleep.h" #include "sys/syspest.h" #include "sys/lock_def.h" /*lock_t osi_fsplock = LOCK_AVAIL;*/ #endif + afs_lock_t osi_fsplock; + static struct osi_packet { *************** *** 38,66 **** afs_lock_t osi_flplock; - afs_int32 afs_preallocs = 512; /* Reserve space for all small allocs! */ - void - osi_AllocMoreSSpace(register afs_int32 preallocs) - { - register int i; - char *p; - - p = (char *)afs_osi_Alloc(AFS_SMALLOCSIZ * preallocs); - #ifdef KERNEL_HAVE_PIN - pin(p, AFS_SMALLOCSIZ * preallocs); /* XXXX */ - #endif - for (i = 0; i < preallocs; i++, p += AFS_SMALLOCSIZ) { - #ifdef AFS_AIX32_ENV - *p = '\0'; /* page fault it in. */ - #endif - osi_FreeSmallSpace((char *)p); - } - afs_stats_cmperf.SmallBlocksAlloced += preallocs; - afs_stats_cmperf.SmallBlocksActive += preallocs; - } - - - /* free space allocated by AllocLargeSpace. Also called by mclput when freeing * a packet allocated by osi_NetReceive. */ --- 39,44 ---- *************** *** 82,179 **** osi_FreeSmallSpace(void *adata) { - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif - AFS_ASSERT_GLOCK(); AFS_STATCNT(osi_FreeSmallSpace); afs_stats_cmperf.SmallBlocksActive--; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - x = splnet(); /*lockl(&osi_fsplock, LOCK_SHORT); */ - #else MObtainWriteLock(&osi_fsplock, 323); - #endif ((struct osi_packet *)adata)->next = freeSmallList; freeSmallList = adata; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - splx(x); /*unlockl(&osi_fsplock); */ - #else MReleaseWriteLock(&osi_fsplock); - #endif - } - - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - static struct osi_packet *freeMediumList; - - osi_AllocMoreMSpace(register afs_int32 preallocs) - { - register int i; - char *p; - - p = (char *)afs_osi_Alloc(AFS_MDALLOCSIZ * preallocs); - #ifdef KERNEL_HAVE_PIN - pin(p, AFS_MDALLOCSIZ * preallocs); /* XXXX */ - #endif - for (i = 0; i < preallocs; i++, p += AFS_MDALLOCSIZ) { - #ifdef AFS_AIX32_ENV - *p = '\0'; /* page fault it in. */ - #endif - osi_FreeMediumSpace((char *)p); - } - afs_stats_cmperf.MediumBlocksAlloced += preallocs; - afs_stats_cmperf.MediumBlocksActive += preallocs; - } - - - void * - osi_AllocMediumSpace(size_t size) - { - register struct osi_packet *tp; - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif - - afs_stats_cmperf.MediumBlocksActive++; - retry: - x = splnet(); - tp = freeMediumList; - if (tp) - freeMediumList = tp->next; - splx(x); - if (!tp) { - osi_AllocMoreMSpace(AFS_MALLOC_LOW_WATER); - goto retry; - } - return tp; } - void - osi_FreeMediumSpace(void *adata) - { - - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif - - afs_stats_cmperf.MediumBlocksActive--; - x = splnet(); - ((struct osi_packet *)adata)->next = freeMediumList; - freeMediumList = adata; - splx(x); - } - #endif /* defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) */ - /* allocate space for sender */ void * --- 60,75 ---- *************** *** 210,338 **** return (char *)tp; } - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - /* - * XXX We could have used a macro around osi_AllocSmallSpace but it's - * probably better like this so that we can remove this at some point. - */ - /* morespace 1 - means we called at splnet level */ - char * - osi_AllocSmall(register afs_int32 size, register afs_int32 morespace) - { - register struct osi_packet *tp; - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif - - AFS_ASSERT_GLOCK(); - - AFS_STATCNT(osi_AllocSmallSpace); - if (size > AFS_SMALLOCSIZ) - osi_Panic("osi_AllocSmall, size=%d", size); - if ((!morespace - && - ((afs_stats_cmperf.SmallBlocksAlloced - - afs_stats_cmperf.SmallBlocksActive) - <= AFS_SALLOC_LOW_WATER)) - || !freeSmallList) { - osi_AllocMoreSSpace(AFS_SALLOC_LOW_WATER * 2); - } - afs_stats_cmperf.SmallBlocksActive++; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - x = splnet(); /*lockl(&osi_fsplock, LOCK_SHORT); */ - #else - MObtainWriteLock(&osi_fsplock, 325); - #endif - tp = freeSmallList; - if (tp) - freeSmallList = tp->next; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - splx(x); /*unlockl(&osi_fsplock); */ - #else - MReleaseWriteLock(&osi_fsplock); - #endif - - return (char *)tp; - } - - int - osi_FreeSmall(register struct osi_packet *adata) - { - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif - - AFS_STATCNT(osi_FreeSmallSpace); - afs_stats_cmperf.SmallBlocksActive--; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - x = splnet(); /*lockl(&osi_fsplock, LOCK_SHORT); */ - #else - MObtainWriteLock(&osi_fsplock, 326); - #endif - adata->next = freeSmallList; - freeSmallList = adata; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - splx(x); /*unlockl(&osi_fsplock); */ - #else - MReleaseWriteLock(&osi_fsplock); - #endif - return 0; - } - #endif /* AFS_AIX32_ENV || AFS_HPUX_ENV */ /* allocate space for sender */ void * osi_AllocSmallSpace(size_t size) { register struct osi_packet *tp; - #if defined(AFS_AIX32_ENV) - int x; - #endif - #if defined(AFS_HPUX_ENV) - ulong_t x; - #endif AFS_STATCNT(osi_AllocSmallSpace); if (size > AFS_SMALLOCSIZ) osi_Panic("osi_AllocSmallS: size=%d\n", size); - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - /* - * We're running out of free blocks (< 50); get some more ourselves so that - * when we don't run out of them when called under splnet() (from rx); - */ - if (((afs_stats_cmperf.SmallBlocksAlloced - - afs_stats_cmperf.SmallBlocksActive) - <= AFS_SALLOC_LOW_WATER) || !freeSmallList) { - osi_AllocMoreSSpace(AFS_SALLOC_LOW_WATER * 2); - } - #else if (!freeSmallList) { afs_stats_cmperf.SmallBlocksAlloced++; afs_stats_cmperf.SmallBlocksActive++; return afs_osi_Alloc(AFS_SMALLOCSIZ); } - #endif afs_stats_cmperf.SmallBlocksActive++; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - x = splnet(); /*lockl(&osi_fsplock, LOCK_SHORT); */ - #else MObtainWriteLock(&osi_fsplock, 327); - #endif tp = freeSmallList; if (tp) freeSmallList = tp->next; - #if defined(AFS_AIX32_ENV) || defined(AFS_HPUX_ENV) - splx(x); /*unlockl(&osi_fsplock); */ - #else MReleaseWriteLock(&osi_fsplock); - #endif return (char *)tp; } --- 106,133 ---- *************** *** 362,371 **** unpin(tp, AFS_SMALLOCSIZ); #endif } - afs_preallocs = 512; - #ifndef AFS_AIX32_ENV LOCK_INIT(&osi_fsplock, "osi_fsplock"); - #endif LOCK_INIT(&osi_flplock, "osi_flplock"); } } --- 157,163 ---- Index: openafs/src/afs/afs_pioctl.c diff -c openafs/src/afs/afs_pioctl.c:1.81.2.9 openafs/src/afs/afs_pioctl.c:1.81.2.12 *** openafs/src/afs/afs_pioctl.c:1.81.2.9 Fri Mar 11 01:50:31 2005 --- openafs/src/afs/afs_pioctl.c Mon Apr 4 00:01:14 2005 *************** *** 11,17 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.9 2005/03/11 06:50:31 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #ifdef AFS_OBSD_ENV --- 11,17 ---- #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.12 2005/04/04 04:01:14 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #ifdef AFS_OBSD_ENV *************** *** 528,543 **** register int ioctlDone = 0, code = 0; AFS_STATCNT(afs_xioctl); ! #if defined(AFS_XBSD_ENV) fdp = p->p_fd; if ((u_int) uap->fd >= fdp->fd_nfiles || (fd = fdp->fd_ofiles[uap->fd]) == NULL) return EBADF; if ((fd->f_flag & (FREAD | FWRITE)) == 0) return EBADF; - #elif defined(AFS_DARWIN_ENV) - if ((code = fdgetf(p, uap->fd, &fd))) - return code; #elif defined(AFS_LINUX22_ENV) ua.com = com; ua.arg = arg; --- 528,543 ---- register int ioctlDone = 0, code = 0; AFS_STATCNT(afs_xioctl); ! #if defined(AFS_DARWIN_ENV) ! if ((code = fdgetf(p, uap->fd, &fd))) ! return code; ! #elif defined(AFS_XBSD_ENV) fdp = p->p_fd; if ((u_int) uap->fd >= fdp->fd_nfiles || (fd = fdp->fd_ofiles[uap->fd]) == NULL) return EBADF; if ((fd->f_flag & (FREAD | FWRITE)) == 0) return EBADF; #elif defined(AFS_LINUX22_ENV) ua.com = com; ua.arg = arg; *************** *** 597,609 **** #endif #endif /* AFS_LINUX22_ENV */ if (tvc && IsAfsVnode(AFSTOV(tvc))) { - #ifdef AFS_DEC_ENV - tvc = VTOAFS(afs_gntovn((struct gnode *)tvc)); - if (!tvc) { /* shouldn't happen with held gnodes */ - u.u_error = ENOENT; - return; - } - #endif /* This is an AFS vnode */ if (((uap->com >> 8) & 0xff) == 'V') { register struct afs_ioctl *datap; --- 597,602 ---- *************** *** 860,868 **** struct AFS_UCRED *foreigncreds = NULL; register afs_int32 code = 0; struct vnode *vp = NULL; - #ifdef AFS_DEC_ENV - struct vnode *gp; - #endif #ifdef AFS_AIX41_ENV struct ucred *credp = crref(); /* don't free until done! */ #endif --- 853,858 ---- *************** *** 976,993 **** /* now make the call if we were passed no file, or were passed an AFS file */ if (!vp || IsAfsVnode(vp)) { ! #if defined(AFS_DEC_ENV) ! /* Ultrix 4.0: can't get vcache entry unless we've got an AFS gnode. ! * So, we must test in this part of the code. Also, must arrange to ! * GRELE the original gnode pointer when we're done, since in Ultrix 4.0, ! * we hold gnodes, whose references hold our vcache entries. ! */ ! if (vp) { ! gp = vp; /* remember for "put" */ ! vp = (struct vnode *)afs_gntovn(vp); /* get vcache from gp */ ! } else ! gp = NULL; ! #elif defined(AFS_SUN5_ENV) code = afs_HandlePioctl(vp, com, &data, follow, &credp); #elif defined(AFS_AIX41_ENV) { --- 966,972 ---- /* now make the call if we were passed no file, or were passed an AFS file */ if (!vp || IsAfsVnode(vp)) { ! #if defined(AFS_SUN5_ENV) code = afs_HandlePioctl(vp, com, &data, follow, &credp); #elif defined(AFS_AIX41_ENV) { *************** *** 1026,1037 **** #else code = EINVAL; /* not in /afs */ #endif - #ifdef AFS_DEC_ENV - if (vp) { - GRELE(vp); - vp = NULL; - } - #endif } rescred: --- 1005,1010 ---- *************** *** 1682,1688 **** AFS_STATCNT(PFlush); if (!avc) return EINVAL; ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonLock(&avc->pvnLock, avc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&avc->lock, 225); --- 1655,1661 ---- AFS_STATCNT(PFlush); if (!avc) return EINVAL; ! #ifdef AFS_BOZONLOCK_ENV afs_BozonLock(&avc->pvnLock, avc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&avc->lock, 225); *************** *** 1699,1705 **** avc->linkData = NULL; } ReleaseWriteLock(&avc->lock); ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonUnlock(&avc->pvnLock, avc); #endif return 0; --- 1672,1678 ---- avc->linkData = NULL; } ReleaseWriteLock(&avc->lock); ! #ifdef AFS_BOZONLOCK_ENV afs_BozonUnlock(&avc->pvnLock, avc); #endif return 0; *************** *** 2570,2586 **** for (i = 0; i < VCSIZE; i++) { for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) { if (tvc->fid.Fid.Volume == volume && tvc->fid.Cell == cell) { ! #if defined(AFS_SGI_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) VN_HOLD(AFSTOV(tvc)); #else #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) osi_vnhold(tvc, 0); #else ! VREFCOUNT_INC(tvc); #endif #endif ReleaseReadLock(&afs_xvcache); ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonLock(&tvc->pvnLock, tvc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&tvc->lock, 232); --- 2543,2559 ---- for (i = 0; i < VCSIZE; i++) { for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) { if (tvc->fid.Fid.Volume == volume && tvc->fid.Cell == cell) { ! #if defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) VN_HOLD(AFSTOV(tvc)); #else #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) osi_vnhold(tvc, 0); #else ! VREFCOUNT_INC(tvc); /* AIX, apparently */ #endif #endif ReleaseReadLock(&afs_xvcache); ! #ifdef AFS_BOZONLOCK_ENV afs_BozonLock(&tvc->pvnLock, tvc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&tvc->lock, 232); *************** *** 2593,2599 **** osi_dnlc_purgedp(tvc); afs_TryToSmush(tvc, *acred, 1); ReleaseWriteLock(&tvc->lock); ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonUnlock(&tvc->pvnLock, tvc); #endif ObtainReadLock(&afs_xvcache); --- 2566,2572 ---- osi_dnlc_purgedp(tvc); afs_TryToSmush(tvc, *acred, 1); ReleaseWriteLock(&tvc->lock); ! #ifdef AFS_BOZONLOCK_ENV afs_BozonUnlock(&tvc->pvnLock, tvc); #endif ObtainReadLock(&afs_xvcache); *************** *** 3353,3358 **** --- 3326,3334 ---- uid = afs_nobody; /* NFS_NOBODY == -2 */ } newcred = crget(); + #if defined(AFS_LINUX26_ENV) + newcred->cr_group_info = groups_alloc(0); + #endif #ifdef AFS_AIX41_ENV setuerror(0); #endif *************** *** 3374,3380 **** newcred->cr_groups[i] = NOGROUP; #endif #endif ! #if !defined(AFS_OSF_ENV) && !defined(AFS_DEC_ENV) afs_nfsclient_init(); /* before looking for exporter, ensure one exists */ #endif if (!(exporter = exporter_find(exporter_type))) { --- 3350,3356 ---- newcred->cr_groups[i] = NOGROUP; #endif #endif ! #if !defined(AFS_OSF_ENV) afs_nfsclient_init(); /* before looking for exporter, ensure one exists */ #endif if (!(exporter = exporter_find(exporter_type))) { *************** *** 3540,3546 **** code = EINVAL; goto out; } ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonLock(&tvc->pvnLock, tvc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&tvc->lock, 649); --- 3516,3522 ---- code = EINVAL; goto out; } ! #ifdef AFS_BOZONLOCK_ENV afs_BozonLock(&tvc->pvnLock, tvc); /* Since afs_TryToSmush will do a pvn_vptrunc */ #endif ObtainWriteLock(&tvc->lock, 649); *************** *** 3557,3563 **** tvc->linkData = NULL; } ReleaseWriteLock(&tvc->lock); ! #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) afs_BozonUnlock(&tvc->pvnLock, tvc); #endif afs_PutVCache(tvc); --- 3533,3539 ---- tvc->linkData = NULL; } ReleaseWriteLock(&tvc->lock); ! #ifdef AFS_BOZONLOCK_ENV afs_BozonUnlock(&tvc->pvnLock, tvc); #endif afs_PutVCache(tvc); Index: openafs/src/afs/afs_prototypes.h diff -c openafs/src/afs/afs_prototypes.h:1.53.2.5 openafs/src/afs/afs_prototypes.h:1.53.2.6 *** openafs/src/afs/afs_prototypes.h:1.53.2.5 Fri Mar 11 01:50:32 2005 --- openafs/src/afs/afs_prototypes.h Sun Apr 3 14:18:54 2005 *************** *** 514,533 **** /* afs_osi_alloc.c */ #ifndef AFS_FBSD_ENV - extern afs_int32 afs_preallocs; extern afs_lock_t osi_fsplock; extern afs_lock_t osi_flplock; #endif extern void osi_FreeLargeSpace(void *adata); - extern void osi_FreeMediumSpace(void *adata); extern void osi_FreeSmallSpace(void *adata); extern void *osi_AllocLargeSpace(size_t size); - extern void *osi_AllocMediumSpace(size_t size); extern void *osi_AllocSmallSpace(size_t size); - #ifndef osi_AllocSmall - extern char *osi_AllocSmall(register afs_int32 size, - register afs_int32 morespace); - #endif /* afs_osi_uio.c */ extern int afsio_copy(struct uio *ainuio, struct uio *aoutuio, --- 514,526 ---- Index: openafs/src/afs/afs_vcache.c diff -c openafs/src/afs/afs_vcache.c:1.65.2.12 openafs/src/afs/afs_vcache.c:1.65.2.15 *** openafs/src/afs/afs_vcache.c:1.65.2.12 Sun Mar 20 15:38:55 2005 --- openafs/src/afs/afs_vcache.c Mon Apr 4 00:01:14 2005 *************** *** 39,45 **** #include "afs/param.h" RCSID ! ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.12 2005/03/20 20:38:55 shadow Exp $"); #include "afs/sys