aix51-support-20020926
authorHartmut Reuter <reuter@rzg.mpg.de>
Tue, 8 Oct 2002 05:15:48 +0000 (05:15 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Oct 2002 05:15:48 +0000 (05:15 +0000)
aix 5.1 support, not yet ready for prime-time

src/afs/VNOPS/afs_vnop_write.c
src/rx/rx_kernel.h

index ceaab48..9656dee 100644 (file)
@@ -427,8 +427,6 @@ int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
     avc->states |= CDirty;
     tvec = (struct iovec *) osi_AllocSmallSpace(sizeof(struct iovec));
     while (totalLength > 0) {
-#if 0 /* Can't call without tdc. Can't call later since GetDCache can be 
-        called with !tdc. Leaving it out for now. */
         /* 
          *  The following lines are necessary because afs_GetDCache with
         *  flag == 4 expects the length field to be filled. It decides
@@ -436,14 +434,6 @@ int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
         *  before writing or not (when the whole chunk is overwritten!).
         */
        len = totalLength;      /* write this amount by default */
-       offset = filePos - AFS_CHUNKTOBASE(tdc->f.chunk);
-       max = AFS_CHUNKTOSIZE(tdc->f.chunk);    /* max size of this chunk */
-       if (max <= len + offset)        {   /*if we'd go past the end of this chunk */
-           /* it won't all fit in this chunk, so write as much
-               as will fit */
-           len = max - offset;
-       }
-#endif
        /* read the cached info */
        if (noLock) {
            tdc = afs_FindDCache(avc, filePos);
index f85b22d..d0843d3 100644 (file)
@@ -42,6 +42,9 @@ typedef struct socket *osi_socket;
 #define        osi_rxSleep(a)  afs_osi_Sleep(a)
 #define        osi_rxWakeup(a) afs_osi_Wakeup(a)
 #endif /* RX_KERNEL_TRACE */
+#else /* AFS_GLOBAL_SUNLOCK || RX_ENABLE_LOCKS */
+#define        osi_rxSleep(a)  afs_osi_Sleep(a)
+#define        osi_rxWakeup(a) afs_osi_Wakeup(a)
 #endif
 
 extern int osi_utoa(char *buf, size_t len, unsigned long val);