mirror of
https://git.openafs.org/openafs.git
synced 2025-01-23 01:11:13 +00:00
9be76c0d31
afs_NewVCache was a twisty turny maze of #ifdefs and duplicated code. This makes a number of sweeping changes to simplify this code, and to move platform specific elements out into their own directories. *) ShakeLooseVCaches is refactored so that the same code can be used both for platforms that support dynamic vcaches, and those which don't. *) afs_NewVCache, ShakeLooseVCaches, and afs_AllocVCache are all modified to remove platform specific code, and to call platform specific functions. *) A new platform file 'osi_vcache.c' is created to hold a number of platform specific vcache operations: *) osi_TryEvictVCache handles the decision of whether a vcache can be evicted or not, and does so if required *) osi_NewVnode allocates a new vnode *) osi_PrePopulateVCache does the necessary population of the vcache, before it's threaded onto the VLRUQ and associated hash tables. *) osi_AttachVnode handles attaching an OS vnode to our vcache, where that is necessary *) osi_PostPopulateVCache handles the vcache population that must occur after we're on the VLRUQ and have a vnode attached. Change-Id: I368e5fb500d012b44141aa8f8cf0516e63e58f57 Reviewed-on: http://gerrit.openafs.org/1881 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
113 lines
2.8 KiB
Plaintext
113 lines
2.8 KiB
Plaintext
# Copyright 2000, International Business Machines Corporation and others.
|
|
# All Rights Reserved.
|
|
#
|
|
# This software has been released under the terms of the IBM Public
|
|
# License. For details, see the LICENSE file in the top-level source
|
|
# directory or online at http://www.openafs.org/dl/license10.html
|
|
#
|
|
# OpenBSD version by Jim Rees
|
|
|
|
srcdir=@srcdir@
|
|
include @TOP_OBJDIR@/src/config/Makefile.config
|
|
INSTALL = @INSTALL@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
|
|
# System specific build commands and flags
|
|
KSRC = @BSD_KERNEL_PATH@
|
|
KFLAGS= -Wall -march=i486 -fno-builtin-printf -fno-builtin-log -nostdinc
|
|
<i386_obsd33>
|
|
KFLAGS+= -fno-stack-protector
|
|
<all>
|
|
KDEFS= \
|
|
${KFLAGS} \
|
|
-I/usr/include -I${KSRC}/sys \
|
|
-DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI586_CPU \
|
|
-DI686_CPU
|
|
DBUG= -O2
|
|
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
|
|
OPTF= ${OPT}
|
|
OPTF2= ${OPT2}
|
|
CFLAGS= ${FSINCLUDES} ${DEFINES} ${KDEFS} ${KOPTS} ${DBUG}
|
|
|
|
# Name of directory to hold object files and libraries.
|
|
KOBJ = MODLOAD
|
|
|
|
# OS specific object files:
|
|
AFS_OS_OBJS = \
|
|
osi_gcpags.o \
|
|
osi_groups.o \
|
|
osi_file.o \
|
|
osi_misc.o \
|
|
osi_sleep.o \
|
|
osi_vcache.o \
|
|
osi_vm.o \
|
|
osi_vnodeops.o
|
|
|
|
#AFS_OS_NFSOBJS = osi_vfsops_nfs.o
|
|
|
|
AFS_OS_NONFSOBJS = osi_vfsops.o
|
|
|
|
# This tells Makefile.common to use its single directory build target.
|
|
COMPDIRS = single_compdir
|
|
INSTDIRS = single_instdir
|
|
DESTDIRS = single_destdir
|
|
|
|
TOP_SRCDIR = ../..
|
|
|
|
include Makefile.common
|
|
|
|
COMMON_INCLUDE = \
|
|
-I.. \
|
|
-I../nfs \
|
|
-I${TOP_SRCDIR} \
|
|
-I${TOP_SRCDIR}/afs \
|
|
-I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
|
|
-I${TOP_SRCDIR}/config \
|
|
-I${TOP_SRCDIR}/rx \
|
|
-I${TOP_SRCDIR}/rx/${MKAFS_OSTYPE} \
|
|
-I${TOP_SRCDIR}/rxkad \
|
|
-I${TOP_SRCDIR}/util \
|
|
-I${TOP_SRCDIR}/../include \
|
|
-I${TOP_SRCDIR}/../include/afs
|
|
|
|
setup:
|
|
-mkdir $(KOBJ)
|
|
-$(RM) -f $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
|
|
ln -fs ../Makefile $(KOBJ)/Makefile
|
|
ln -fs ../Makefile.common $(KOBJ)/Makefile.common
|
|
-$(RM) -f h lib
|
|
-ln -fs ${KSRC}/sys h
|
|
-ln -fs ${KSRC}/lib .
|
|
-touch $(KOBJ)/sec_net.h
|
|
|
|
|
|
# Below this line are targets when in the COMMON directory:
|
|
LIBAFS = libafs.nfs.o
|
|
LIBAFSNONFS = libafs.o
|
|
|
|
INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
|
|
INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
|
|
|
|
DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
|
|
DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
|
|
|
|
|
|
libafs: $(LIBAFSNONFS)
|
|
ls -l libafs.o
|
|
|
|
install_libafs: $(LIBAFS)
|
|
${INSTALL} -d ${DESTDIR}${afskerneldir}
|
|
${INSTALL} -m 644 $(LIBAFS) $(INST_LIBAFSNONFS)
|
|
|
|
dest_libafs: $(LIBAFS)
|
|
${INSTALL} -d ${DEST}/root.client/bin
|
|
$(INSTALL) -m 644 $(LIBAFS) $(DEST_LIBAFSNONFS)
|
|
|
|
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
|
|
$(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
|
|
|
|
${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
|
$(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
|