if (ahost != thost) {
/* host/client recycle */
char hoststr[16], hoststr2[16];
- ViceLog(0, ("CallPostamble: ahost %s:%d (%x) != thost "
- "%s:%d (%x)\n",
+ ViceLog(0, ("CallPostamble: ahost %s:%d (%p) != thost "
+ "%s:%d (%p)\n",
afs_inet_ntoa_r(ahost->host, hoststr),
ntohs(ahost->port),
ahost,
h_Release_r(ahost);
} else {
char hoststr[16];
- ViceLog(0, ("CallPostamble: null ahost for thost %s:%d (%x)\n",
+ ViceLog(0, ("CallPostamble: null ahost for thost %s:%d (%p)\n",
afs_inet_ntoa_r(thost->host, hoststr),
ntohs(thost->port),
thost));
{
char *eACL; /* External access list placeholder */
- if (acl_Externalize
- ((targetptr->disk.type ==
+ if (acl_Externalize_pr
+ (hpr_IdToName, (targetptr->disk.type ==
vDirectory ? VVnodeACL(targetptr) :
VVnodeACL(parentwhentargetnotdir)), &eACL) != 0) {
return EIO;
{
struct acl_accessList *newACL; /* PlaceHolder for new access list */
- if (acl_Internalize(AccessList->AFSOpaque_val, &newACL) != 0)
+ if (acl_Internalize_pr(hpr_NameToId, AccessList->AFSOpaque_val, &newACL)
+ != 0)
return (EINVAL);
if ((newACL->size + 4) > VAclSize(targetptr))
return (E2BIG);
afs_sfsize_t tPos, tLen;
#ifdef AFS_64BIT_ENV
-#ifndef AFS_LARGEFILE_ENV
- if (Pos + Len > 0x7fffffff)
- return EFBIG;
-#endif /* !AFS_LARGEFILE_ENV */
tPos = (afs_sfsize_t) Pos;
tLen = (afs_sfsize_t) Len;
#else /* AFS_64BIT_ENV */
&rights, &anyrights)))
goto Bad_BulkStatus;
/* set volume synchronization information, but only once per call */
- if (i == nfiles)
+ if (i == 0)
SetVolumeSync(Sync, volptr);
/* Are we allowed to fetch Fid's status? */
struct host *thost;
struct client *t_client = NULL; /* tmp ptr to client data */
AFSFetchStatus *tstatus;
+ int VolSync_set = 0;
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
}
CallBacks->AFSCBs_len = nfiles;
+ /* Zero out return values to avoid leaking information on partial succes */
+ memset(OutStats->AFSBulkStats_val, 0, nfiles * sizeof(struct AFSFetchStatus));
+ memset(CallBacks->AFSCBs_val, 0, nfiles * sizeof(struct AFSCallBack));
+ memset(Sync, 0, sizeof(*Sync));
+
if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost))) {
goto Bad_InlineBulkStatus;
}
}
/* set volume synchronization information, but only once per call */
- if (i == nfiles)
+ if (!VolSync_set) {
SetVolumeSync(Sync, volptr);
+ VolSync_set = 1;
+ }
/* Are we allowed to fetch Fid's status? */
if (targetptr->disk.type != vDirectory) {
afs_fsize_t tFileLength;
#ifdef AFS_64BIT_ENV
-#ifndef AFS_LARGEFILE_ENV
- if (FileLength > 0x7fffffff)
- return EFBIG;
-#endif /* !AFS_LARGEFILE_ENV */
tPos = (afs_fsize_t) Pos;
tLength = (afs_fsize_t) Length;
tFileLength = (afs_fsize_t) FileLength;
dataBytes = 1 * sizeof(afs_int32);
dataBuffP = (afs_uint32 *) malloc(dataBytes);
dataBuffP[0] = VICED_CAPABILITY_ERRORTRANS | VICED_CAPABILITY_WRITELOCKACL;
-#if defined(AFS_64BIT_ENV) && defined(AFS_LARGEFILE_ENV)
+#if defined(AFS_64BIT_ENV)
dataBuffP[0] |= VICED_CAPABILITY_64BITFILES;
#endif
if (saneacls)
if (Pos == 0) CopyOnWrite_off0++;
if (CoW_len > CopyOnWrite_maxsize) CopyOnWrite_maxsize = CoW_len;
- ViceLog(1, ("StoreData : calling CopyOnWrite on vnode %lu.%lu (%s) off 0x%llx size 0x%llx\n",
- V_id(volptr), targetptr->vnodeNumber, V_name(volptr), 0, Pos));
+ ViceLog(1, ("StoreData : calling CopyOnWrite on vnode %u.%u (%s) "
+ "off 0x0 size 0x%llx\n",
+ afs_printable_VolumeId_u(V_id(volptr)),
+ afs_printable_VnodeId_u(targetptr->vnodeNumber),
+ V_name(volptr), Pos));
if ((errorCode = CopyOnWrite(targetptr, volptr, 0, Pos))) {
ViceLog(25, ("StoreData : CopyOnWrite failed\n"));
volptr->partition->flags &= ~PART_DONTUPDATE;
#else /* AFS_NT40_ENV */
errorCode = rx_Readv(Call, tiov, &tnio, RX_MAXIOVECS, rlen);
#endif /* AFS_NT40_ENV */
-#if FS_STATS_DETAILED
- (*a_bytesStoredP) += errorCode;
-#endif /* FS_STATS_DETAILED */
if (errorCode <= 0) {
errorCode = -32;
break;
}
+#if FS_STATS_DETAILED
+ (*a_bytesStoredP) += errorCode;
+#endif /* FS_STATS_DETAILED */
rlen = errorCode;
#ifdef AFS_NT40_ENV
errorCode = FDH_WRITE(fdP, tbuffer, rlen);
if (origfdP) { /* finish CopyOnWrite */
if ( (CoW_off = Pos + Length) < NewLength) {
errorCode = CopyOnWrite2(origfdP, fdP, CoW_off, CoW_len = NewLength - CoW_off);
- ViceLog(1, ("StoreData : CopyOnWrite2 on vnode %lu.%lu (%s) off 0x%llx size 0x%llx returns %d\n",
- V_id(volptr), targetptr->vnodeNumber, V_name(volptr), CoW_off, CoW_len, errorCode));
+ ViceLog(1, ("StoreData : CopyOnWrite2 on vnode %u.%u (%s) "
+ "off 0x%llx size 0x%llx returns %d\n",
+ afs_printable_VolumeId_u(V_id(volptr)),
+ afs_printable_VnodeId_u(targetptr->vnodeNumber),
+ V_name(volptr), CoW_off, CoW_len, errorCode));
}
FDH_CLOSE(origfdP);
}