* now vectors to the correct EFS or XFS function. If new functionality is
* added which accesses the inode, that will also need EFS/XFS variants.
*/
+#ifdef AFS_SGI_EFS_IOPS_ENV
vnode_t *afs_EFSIGetVnode(ino_t ainode)
{
struct inode *ip;
iunlock(ip);
return (EFS_ITOV(ip));
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
vnode_t *afs_XFSIGetVnode(ino_t ainode)
{
return code;
}
+#ifdef AFS_SGI_EFS_IOPS_ENV
void osi_DisableAtimes(avp)
struct vnode *avp;
{
}
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
/* Generic read interface */
if (code == 0) {
code = asize - resid;
afile->offset += code;
+#ifdef AFS_SGI_EFS_IOPS_ENV
osi_DisableAtimes(afile->vnode);
+#endif /* AFS_SGI_EFS_IOPS_ENV */
}
else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
return ENOSYS;
#endif
- if (error = iget(vfstom(vfsp), (unsigned int)(inode&0xffffffff), &ip)) {
+ if (error = iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)),
+ (unsigned int)(inode&0xffffffff), &ip)) {
return error;
}
*ipp = ip;
}
#endif
- if (error = xfs_iget(vfstom(vfsp), (void*)0,
- (xfs_ino_t)inode,XFS_ILOCK_SHARED, &ip, (daddr_t)0)) {
+ if (error = xfs_iget((((struct mount *)
+ ((vfsp)->vfs_bh.bh_first)->bd_pdata)),
+ (void*)0, (xfs_ino_t)inode,
+ XFS_ILOCK_SHARED, &ip, (daddr_t)0)) {
SET_XFS_ERROR(3, vfsp->vfs_dev, inode);
return error;
}
};
/* EFS only fs suite uses this entry point - icreate in afssyscalls.c. */
+#ifdef AFS_SGI_EFS_IOPS_ENV
int
icreate(struct icreateargs *uap, rval_t *rvp)
{
iput(newip);
return 0;
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
#ifdef AFS_SGI_XFS_IOPS_ENV
/* inode creation routines for icreatename64 entry point. Use for EFS/XFS
if (!vfsp)
return ENXIO;
+#ifdef AFS_SGI_EFS_IOPS_ENV
if (vfsp->vfs_fstype == efs_fstype) {
struct inode *ip;
if (error = igetinode(vfsp, (dev_t)dev, inode, &ip))
}
iunlock(ip);
}
- else if (vfsp->vfs_fstype == xfs_fstype) {
- struct xfs_inode *xip;
- if (error = xfs_igetinode(vfsp, (dev_t)dev, inode, &xip))
- return error;
- vp = XFS_ITOV(xip);
- if (error = vfile_alloc((usrmod+1) & (FMASK), &fp, &fd)) {
- VN_RELE(vp);
- return error;
- }
- }
- else {
- osi_Panic("afs_syscall_iopen: bad fstype = %d\n",
- vfsp->vfs_fstype);
- }
+ else
+#endif /* AFS_SGI_EFS_IOPS_ENV */
+ if (vfsp->vfs_fstype == xfs_fstype) {
+ struct xfs_inode *xip;
+ if (error = xfs_igetinode(vfsp, (dev_t)dev, inode, &xip))
+ return error;
+ vp = XFS_ITOV(xip);
+ if (error = vfile_alloc((usrmod+1) & (FMASK), &fp, &fd)) {
+ VN_RELE(vp);
+ return error;
+ }
+ }
+ else {
+ osi_Panic("afs_syscall_iopen: bad fstype = %d\n",
+ vfsp->vfs_fstype);
+ }
vfile_ready(fp, vp);
rvp->r_val1 = fd;
return 0;
* Only VICEMAGIC type inodes.
*/
#ifdef AFS_SGI_XFS_IOPS_ENV
+#ifdef AFS_SGI_EFS_IOPS_ENV
/* efs_iincdec
*
* XFS/EFS iinc/idec code for EFS. Uses 32 bit inode numbers.
iput(ip);
return error;
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
/* xfs_iincdec
*
int nlink;
int vol;
- code = xfs_iget(vfstom(vfsp), (void*)0, (xfs_ino_t)inode, XFS_ILOCK_SHARED,
- &ip, (daddr_t)0);
+ code = xfs_iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)),
+ (void*)0, (xfs_ino_t)inode, XFS_ILOCK_SHARED, &ip,
+ (daddr_t)0);
if (code)
return code;
inode |= inode_lo;
return xfs_iincdec64(vfsp, inode, inode_p1, amount);
}
+#ifdef AFS_SGI_EFS_IOPS_ENV
else if (vfsp->vfs_fstype == efs_fstype) {
return efs_iincdec(vfsp, inode_lo, inode_p1, amount);
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
return ENXIO;
}
inode = inode_hi;
inode <<= 32;
inode |= inode_lo;
- code = xfs_iget(vfstom(vfsp), (void*)0, (xfs_ino_t)inode,
+ code = xfs_iget((((struct mount *)((vfsp)->vfs_bh.bh_first)->bd_pdata)),
+ (void*)0, (xfs_ino_t)inode,
XFS_ILOCK_SHARED, &ip, (daddr_t)0);
if (code)
return code;
#ifdef AFS_SGI64_ENV
#include <ksys/behavior.h>
#endif /* AFS_SGI64_ENV */
+#include "../fs/efs_inode.h"
+#ifdef AFS_SGI_EFS_IOPS_ENV
#include "../sgiefs/efs.h"
+#endif
#include "../sys/kmem.h"
#include "../sys/cred.h"
#include "../sys/resource.h"
-ln -s /usr/include/sys h
-ln -s /usr/include/net /usr/include/netinet .
-ln -s /usr/include/rpc /usr/include/sys .
- -ln -s ../../obj/sgiefs sgiefs
+ -ln -s /usr/include/sys/fs .
-mkdir ${DESTDIR}root.client/bin
-mkdir ${DESTDIR}root.client/usr/vice/etc/sgiload
<all -sgi_65>
export CPU_KDEFS ;\
export LDFLAGS ;\
cd $$dir ; \
- $(MAKE) IPNO=$$p DESTDIR=../${DESTDIR} $$t.libafs || exit $$?; \
+ $(MAKE) IPNO=$$p DESTDIR=${DESTDIR} $$t.libafs || exit $$?; \
cd ../ ; \
done; \
done
<all>
-LIBAFSA = libafs.a
LIBAFSNONFSA = libafs.nonfs.a
COPYFILES = copyfiles
LINKFILES = linkfiles
MODLOADCLIENTDIR = ${DESTDIR}root.client/usr/vice/etc/sgiload
# Make the NFS and no-NFS clients for this directory.
-# STATIC.libafs: ${LIBAFSA} ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
+# STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
STATIC.libafs: ${LIBAFSNONFSA} ${COPYFILES} ${LINKFILES}
<all -sgi_65>
- ${CP} ${LIBAFSA} \
- ${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.a
${CP} ${LIBAFSNONFSA} \
${STATICCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.a
<sgi_65>
- ${CP} ${LIBAFSA} \
- ${STATICCLIENTDIR}/libafs.${IPNO}.a
${CP} ${LIBAFSNONFSA} \
${STATICCLIENTDIR}/libafs.${IPNO}.nonfs.a
<all>
-${LIBAFSA}: $(AFSAOBJS) $(AFSNFSOBJS)
- $(AR) cru $@ $?
-
${LIBAFSNONFSA}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(AR) cru $@ $?
-LIBAFSO = libafs.o
LIBAFSNONFSO = libaf.nonfs.o
-# MODLOAD.libafs: ${LIBAFSO} ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
+# MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
MODLOAD.libafs: ${LIBAFSNONFSO} ${COPYFILES} ${LINKFILES}
<all -sgi_65>
- ${CP} ${LIBAFSO} \
- ${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.o
${CP} ${LIBAFSNONFSO} \
${MODLOADCLIENTDIR}/libafs.${MPSP}.${CPUARCH}.nonfs.o
<sgi_65>
- ${CP} ${LIBAFSO} \
- ${MODLOADCLIENTDIR}/libafs.${IPNO}.o
${CP} ${LIBAFSNONFSO} \
${MODLOADCLIENTDIR}/libafs.${IPNO}.nonfs.o
<all>
-${LIBAFSO}: $(AFSAOBJS) $(AFSNFSOBJS)
- $(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSO} $(AFSAOBJS) $(AFSNFSOBJS)
-
-
${LIBAFSNONFSO}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(LD) ${LDFLAGS} -elf -r -d -G 0 -o ${LIBAFSNONFSO} \
$(AFSAOBJS) $(AFSNONFSOBJS)
#else
struct sockaddr_in addr;
int addrlen = sizeof(addr);
- if (getsockname(rx_socket, (struct sockaddr *) &addr, &addrlen)) {
+ if (getsockname((int)rx_socket, (struct sockaddr *) &addr, &addrlen)) {
rx_Finalize();
return -1;
}
*linux* ) \
${CC} ${LDFLAGS} -o salvager vol-salvage.o physio.o \
${LIBS} ;; \
- sgi_* ) \
- ${CC} ${LDFLAGS} -o salvager vol-salvage.o physio.o \
- ${LIBS} ../sgiefs/libefs.a ;; \
*) \
${CC} ${LDFLAGS} -o salvager vol-salvage.o physio.o \
${LIBS};; \
#if defined(AFS_SGI_ENV)
#include <fcntl.h>
#include <mntent.h>
-#include "../sgiefs/efs.h"
+#ifdef AFS_SGI_EFS_IOPS_ENV
#define ROOTINO EFS_ROOTINO
+#include "../sgiefs/efs.h"
+#endif
#else
#ifdef AFS_LINUX22_ENV
#include <mntent.h>
/* libefs.h includes <assert.h>, which we don't want */
#define __ASSERT_H__
+#ifdef AFS_SGI_EFS_IOPS_ENV
#include "../sgiefs/libefs.h"
extern int Log();
return err;
}
+#endif /* AFS_SGI_EFS_IOPS_ENV */
#ifdef AFS_SGI_XFS_IOPS_ENV
#include <dirent.h>
int ninodes = 0, err = 0;
struct efs_dinode *dinodeBuf = NULL;
int last_cgno;
+#ifdef AFS_SGI_EFS_IOPS_ENV
EFS_MOUNT *mp;
+#endif
ino_t imax, inum; /* total number of I-nodes in file system */
*forcep = 0;
}
else
#endif
- {
- if (root_inode.st_ino != EFS_ROOTINO) {
- Log("%s is not root of a filesystem\n", mountedOn);
- return -1;
- }
+#ifdef AFS_SGI_EFS_IOPS_ENV
+ if (root_inode.st_ino == EFS_ROOTINO) {
return efs_ListViceInodes(devname, mountedOn, resultFile,
- judgeInode, judgeParam,
+ judgeInode, judgeParam,
forcep, forceR, wpath);
}
+ else
+#endif
+ {
+ Log("%s is not root of a filesystem\n", mountedOn);
+ return -1;
+ }
}
#else /* AFS_SGI_ENV */
#if defined(AFS_SGI_ENV)
#include <fcntl.h>
#include <mntent.h>
-#ifndef AFS_SGI_XFS_IOPS_ENV
+#ifdef AFS_SGI_EFS_IOPS_ENV
#define ROOTINO EFS_ROOTINO
-#endif
-/*
#include <sys/fs/efs.h>
-*/
-#include "../sgiefs/efs.h" /* until 5.1 release */
+#include "../sgiefs/efs.h" /* until 5.1 release */
+#endif
+
#else
#ifndef AFS_LINUX20_ENV
#include <fcntl.h>
#include <mntent.h>
#include "partition.h"
+#ifdef AFS_SGI_EFS_IOPS_ENV
#include "../sgiefs/efs.h"
+#endif
#include <afs/xfsattrs.h>
char *prog = "xfs_size_check";
*linux*) \
${CC} ${DBUG} -o volserver $(SOBJS) $(HACKS) \
${LDFLAGS} $(LIBS) ${XLIBS} ;; \
- sgi_*) \
- ${CC} ${DBUG} -o volserver $(SOBJS) $(HACKS) \
- ${LDFLAGS} $(LIBS) ${XLIBS} \
- ../sgiefs/libefs.a ;; \
*) \
${CC} ${DBUG} -g -o volserver $(SOBJS) $(HACKS) \
${LDFLAGS} $(LIBS) ${XLIBS} ;; \