buf = pageio_setup(page, PAGESIZE, vp, B_READ); /* allocate a buf structure */
buf->b_edev = 0;
buf->b_dev = 0;
+#if defined(AFS_SUN56_ENV)
+ buf->b_lblkno = lbtodb(toffset);
+#else
buf->b_blkno = btodb(toffset);
+#endif
bp_mapin(buf); /* map it in to our address space */
AFS_GLOCK();
return (ENOMEM);
tbuf->b_dev = 0;
+#if defined(AFS_SUN56_ENV)
+ tbuf->b_lblkno = lbtodb(pages->p_offset);
+#else
tbuf->b_blkno = btodb(pages->p_offset);
+#endif
bp_mapin(tbuf);
AFS_GLOCK();
afs_Trace4(afs_iclSetp, CM_TRACE_PAGEOUTONE, ICL_TYPE_LONG, avc,
afs_Trace4(afs_iclSetp, CM_TRACE_VMRW, ICL_TYPE_POINTER, (afs_int32) avc,
ICL_TYPE_LONG, (arw == UIO_WRITE ? 1 : 0), ICL_TYPE_OFFSET,
- ICL_HANDLE_OFFSET(auio->uio_offset), ICL_TYPE_OFFSET,
+ ICL_HANDLE_OFFSET(auio->uio_loffset), ICL_TYPE_OFFSET,
ICL_HANDLE_OFFSET(auio->uio_resid));
#ifndef AFS_64BIT_CLIENT
/* adjust parameters when appending files */
if ((ioflag & IO_APPEND) && arw == UIO_WRITE) {
-#if defined(AFS_SUN56_ENV)
- auio->uio_loffset = 0;
-#endif
+#if defined(AFS_SUN56_ENV)
+ auio->uio_loffset = avc->m.Length; /* write at EOF position */
+#else
auio->uio_offset = avc->m.Length; /* write at EOF position */
+#endif
}
- if (auio->uio_offset < 0 || (auio->uio_offset + auio->uio_resid) < 0) {
+ if (auio->afsio_offset < 0 || (auio->afsio_offset + auio->uio_resid) < 0) {
ReleaseWriteLock(&avc->lock);
afs_BozonUnlock(&avc->pvnLock, avc);
return EINVAL;
{
register int code = 0;
- if ((*noffp < 0 || *noffp > MAXOFF_T))
+#ifndef AFS_64BIT_CLIENT
+# define __MAXOFF_T MAXOFF_T
+#else
+# define __MAXOFF_T MAXOFFSET_T
+#endif
+
+ if ((*noffp < 0 || *noffp > __MAXOFF_T))
code = EINVAL;
return code;
}
tuio.afsio_iovcnt = 1;
#if defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_XBSD_ENV)
#ifdef AFS_64BIT_CLIENT
+#ifdef AFS_SUN5_ENV
+ tuio.afsio_offset = (afs_offs_t) ldbtob(abp->b_lblkno);
+#else
tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
+#endif
#else /* AFS_64BIT_CLIENT */
tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
-#if defined(AFS_SUN5_ENV)
- tuio._uio_offset._p._u = 0;
-#endif
#endif /* AFS_64BIT_CLIENT */
#else
tuio.afsio_offset = DEV_BSIZE * abp->b_blkno;
tuio.afsio_iovcnt = 1;
#if defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV)
#ifdef AFS_64BIT_CLIENT
+#ifdef AFS_SUN5_ENV
+ tuio.afsio_offset = (afs_offs_t) ldbtob(abp->b_lblkno);
+#else
tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
+#endif
#else /* AFS_64BIT_CLIENT */
tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
-#ifdef AFS_SUN5_ENV
- tuio._uio_offset._p._u = 0;
-#endif
#endif /* AFS_64BIT_CLIENT */
#ifdef AFS_SUN5_ENV
#ifdef AFS_SUN59_ENV
tv->iov_base = (char *)(tv->iov_base) + cnt;
tv->iov_len -= cnt;
auio->uio_resid -= cnt;
- auio->uio_offset += cnt;
+ auio->afsio_offset += cnt;
asize -= cnt;
}
#endif
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-/*
- * Only define on 64 bit kernel, until problems with 32 bit
- * and large file support are resolved
- */
-#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
-#endif
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#ifndef AFS_PARAM_H
#define AFS_PARAM_H
-#include <afs/afs_sysnames.h>
-
#define AFS_VFS_ENV 1
/* Used only in vfsck code; is it needed any more???? */
#define RXK_LISTENER_ENV 1
#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
+
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
#define AFS_SYSCALL 105
#define AFS_HAVE_FLOCK_SYSID 1
+#include <afs/afs_sysnames.h>
+
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-/*
- * Only define on 64 bit kernel, until problems with 32 bit
- * and large file support are resolved
- */
-#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
-#endif
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-/*
- * Only define on 64 bit kernel, until problems with 32 bit
- * and large file support are resolved
- */
-#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
-#endif
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#if defined(__amd64)
#define AFS_SUN57_64BIT_ENV 1
#define AFS_64BIT_INO 1
-#define AFS_64BIT_CLIENT 1
#endif
/**
#define AFS_64BIT_ENV 1
-
#include <afs/afs_sysnames.h>
#if 0
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_MOUNT_AFS 1
/* Machine / Operating system information */
-#define sys_sun4x_55 1
-#define SYS_NAME "sun4x_55"
-#define SYS_NAME_ID SYS_NAME_ID_sun4x_55
+#define sys_sunx86_57 1
+#define SYS_NAME "sunx86_57"
+#define SYS_NAME_ID SYS_NAME_ID_sunx86_57
#define AFSLITTLE_ENDIAN 1
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid
#define AFS_MOUNT_AFS 1
/* Machine / Operating system information */
-#define sys_sun4x_55 1
-#define SYS_NAME "sun4x_55"
-#define SYS_NAME_ID SYS_NAME_ID_sun4x_55
+#define sys_sunx86_58 1
+#define SYS_NAME "sunx86_58"
+#define SYS_NAME_ID SYS_NAME_ID_sunx86_58
#define AFSLITTLE_ENDIAN 1
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*#define AFS_USEBUFFERS 1*/
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
-#define afsio_offset uio_offset
+#define afsio_offset uio_loffset
#define afsio_seg uio_segflg
#define afsio_fmode uio_fmode
#define afsio_resid uio_resid