demand attach build always

always build demand attach. includes doubtless-broken
windows support. installs dafileserver, dasalvager, davolserver.
salvageserver keeps its (unique) name.

Change-Id: Ia272dd2b0f72789b9e0f2a7712f9c206bb922095
Reviewed-on: http://gerrit.openafs.org/2403
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-07-13 16:47:39 -04:00
parent aa97bf5dd4
commit 3610ba191f
14 changed files with 897 additions and 80 deletions

View File

@ -265,21 +265,14 @@ vol: cmd comerr dir afs sgiefs
+${COMPILE_PART1} vol ${COMPILE_PART2}
tsalvaged: vol libafsrpc libafsauthent cmd util
+set -x; \
if test "@DEMAND_ATTACH@" = "yes" ; then \
case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
+case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*|*_darwin_*) \
${COMPILE_PART1} tsalvaged ${COMPILE_PART2} ;; \
*_darwin_[1-6][0-9]) \
echo Not building MT tsalvaged for ${SYS_NAME} ;; \
*_darwin_*) \
${COMPILE_PART1} tsalvaged ${COMPILE_PART2} ;; \
*) \
echo Not building MT tsalvaged for ${SYS_NAME} ;; \
esac \
else \
echo skipping tsalvaged ; \
fi
esac
vlserver: cmd comerr vol audit vlserver_depinstall
@ -303,23 +296,25 @@ viced: cmd comerr vlserver tvlserver audit
tviced: cmd comerr viced vlserver tvlserver libafsrpc libafsauthent
+case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[of]bsd*|*nbsd[234]*) \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[of]bsd*|*nbsd[234]*|*_darwin_*) \
${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
*_darwin_[1-6][0-9]) \
echo Not building MT viced for ${SYS_NAME} ;; \
*_darwin_*) \
${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
*) \
echo Not building MT viced for ${SYS_NAME} ;; \
esac
dviced: cmd comerr viced vlserver tvlserver libafsrpc libafsauthent
+case ${SYS_NAME} in \
alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[of]bsd*|*nbsd[234]*|*_darwin_*) \
${COMPILE_PART1} dviced ${COMPILE_PART2} ;; \
*) \
echo Not building DAFS viced for ${SYS_NAME} ;; \
esac
volser: cmd comerr tviced usd kauth audit
+${COMPILE_PART1} volser ${COMPILE_PART2}
tvolser: project tviced usd libafsrpc libafsauthent volser
+@case ${SYS_NAME} in \
*_darwin_[1-6][0-9]) \
echo Not building MT volser for ${SYS_NAME} ;; \
*_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*obsd*) \
${COMPILE_PART1} tvolser ${COMPILE_PART2} && \
if [ "xyes" = "x$(ENABLE_PTHREADED_UNIK)" ] ; then \
@ -329,6 +324,14 @@ tvolser: project tviced usd libafsrpc libafsauthent volser
echo Not building MT volser for ${SYS_NAME} ;; \
esac
dvolser: project tviced usd libafsrpc libafsauthent volser
+@case ${SYS_NAME} in \
*_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*obsd*) \
${COMPILE_PART1} dvolser ${COMPILE_PART2} ;; \
*) \
echo Not building DAFS volser for ${SYS_NAME} ;; \
esac
venus: cmd comerr volser ptserver
+${COMPILE_PART1} venus ${COMPILE_PART2}
+${COMPILE_PART1} venus/test ${COMPILE_PART2}
@ -644,6 +647,7 @@ build_tools: config des comerr rxgen
finale: project cmd comerr afsd butc tbutc tbudb @ENABLE_KERNEL_MODULE@ libuafs audit kauth log \
ptserver tptserver scout bu_utils ubik uss bozo @VFSCK@ volser tvolser tsalvaged \
dviced dvolser \
venus update xstat afsmonitor rxdebug libafsrpc \
libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
platform kopenafs authtools
@ -651,6 +655,7 @@ finale: project cmd comerr afsd butc tbutc tbudb @ENABLE_KERNEL_MODULE@ libuafs
finale_nolibafs: project cmd comerr afsd butc tbutc tbudb libuafs audit kauth log \
ptserver tptserver scout bu_utils ubik tubik uss bozo @VFSCK@ volser tvolser tsalvaged \
dviced dvolser \
venus update xstat afsmonitor rxdebug libafsrpc \
libafsauthent shlibafsrpc shlibafsauthent libadmin man-pages \
platform kopenafs authtools
@ -711,8 +716,10 @@ clean2:
-${COMPILE_PART1} tvlserver ${COMPILE_CLEAN}
-${COMPILE_PART1} viced ${COMPILE_CLEAN}
-${COMPILE_PART1} tviced ${COMPILE_CLEAN}
-${COMPILE_PART1} dviced ${COMPILE_CLEAN}
-${COMPILE_PART1} volser ${COMPILE_CLEAN}
-${COMPILE_PART1} tvolser ${COMPILE_CLEAN}
-${COMPILE_PART1} dvolser ${COMPILE_CLEAN}
-${COMPILE_PART1} tsalvaged ${COMPILE_CLEAN}
-${COMPILE_PART1} venus ${COMPILE_CLEAN}
-${COMPILE_PART1} venus/test ${COMPILE_CLEAN}
@ -809,6 +816,8 @@ distclean: clean
src/des/test/Makefile \
src/dir/Makefile \
src/dir/test/Makefile \
src/dviced/Makefile \
src/dvolser/Makefile \
src/export/Makefile \
src/finale/Makefile \
src/fsint/Makefile \

View File

@ -97,11 +97,6 @@ AC_ARG_ENABLE([bitmap-later],
needed])],
,
[enable_bitmap_later="no"])
AC_ARG_ENABLE([demand-attach-fs],
[AS_HELP_STRING([--enable-demand-attach-fs],
[enable Demand Attach Fileserver (please see documentation)])],
,
[enable_demand_attach_fs="no"])
AC_ARG_ENABLE([unix-sockets],
[AS_HELP_STRING([--disable-unix-sockets],
[disable use of unix domain sockets for fssync (defaults to enabled)])],
@ -1126,14 +1121,6 @@ if test "$enable_bitmap_later" = "yes"; then
AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later])
fi
if test "$enable_demand_attach_fs" = "yes"; then
AC_DEFINE(DEMAND_ATTACH_ENABLE, 1, [define if you want the demand attach fileserver])
DEMAND_ATTACH="yes"
else
DEMAND_ATTACH="no"
fi
AC_SUBST(DEMAND_ATTACH)
if test "$enable_unix_sockets" = "yes"; then
AC_DEFINE(USE_UNIX_SOCKETS, 1, [define if you want to use UNIX sockets for fssync.])
USE_UNIX_SOCKETS="yes"

View File

@ -135,6 +135,8 @@ src/des/Makefile \
src/des/test/Makefile \
src/dir/Makefile \
src/dir/test/Makefile \
src/dviced/Makefile \
src/dvolser/Makefile \
src/export/Makefile \
src/finale/Makefile \
src/fsint/Makefile \

237
src/dviced/Makefile.in Normal file
View File

@ -0,0 +1,237 @@
# 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
#
# Portions Copyright (c) 2003 Apple Computer, Inc.
srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
CC=${MT_CC}
CFLAGS=${COMMON_CFLAGS} -DNINTERFACE ${MT_CFLAGS} -DRXDEBUG -DFSSYNC_BUILD_SERVER -DSALVSYNC_BUILD_CLIENT -DAFS_DEMAND_ATTACH_FS
CCRULE=${CC} ${CFLAGS} -c $?
RX=../rx
VICED=../viced
TVICED=../tviced
VLSERVER=../vlserver
LWP=../lwp
LIBACL=../libacl
UTIL=../util
DIR=../dir
VOL=../vol
FSINT=../fsint
VICEDOBJS=viced.o afsfileprocs.o host.o physio.o callback.o serialize_state.o
VLSERVEROBJS=vldbint.cs.o vldbint.xdr.o
LWPOBJS=lock.o threadname.o
LIBACLOBJS=aclprocs.o netprocs.o
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
DIROBJS=buffer.o dir.o salvage.o
VOLOBJS= vnode.o volume.o vutil.o partition.o fssync-server.o \
clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o \
fstab.o salvsync-client.o daemon_com.o vg_cache.o vg_scan.o
FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
RXOBJS = rx_pthread.o
objects= ${VICEDOBJS} ${VLSERVEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS} ${RXOBJS}
SDBGOBJS = state_analyzer.o uuid.o dirpath.o fileutil.o ${TOP_LIBDIR}/util.a
LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.a
all: dafileserver state_analyzer
rx_pthread.o: ${RX}/rx_pthread.c
${CCRULE} -DDPF_FSLOG
viced.o: ${VICED}/viced.c
${CCRULE}
afsfileprocs.o: ${VICED}/afsfileprocs.c
${CCRULE}
host.o: ${VICED}/host.c
${CCRULE}
physio.o: ${VICED}/physio.c
${CCRULE}
callback.o: ${VICED}/callback.c
${CCRULE}
serialize_state.o: ${TVICED}/serialize_state.c
${CCRULE}
assert.o: ${UTIL}/assert.c
${CCRULE}
uuid.o: ${UTIL}/uuid.c
${CCRULE}
serverLog.o: ${UTIL}/serverLog.c
${CCRULE}
fileutil.o: ${UTIL}/fileutil.c
${CCRULE}
volparse.o: ${UTIL}/volparse.c
${CCRULE}
flipbase64.o: ${UTIL}/flipbase64.c
${CCRULE}
netutils.o: ${UTIL}/netutils.c
${CCRULE} -I../util
dirpath.o: ${UTIL}/dirpath.c
${CCRULE}
softsig.o: ${UTIL}/softsig.c
${CCRULE}
lock.o: ${LWP}/lock.c
${CCRULE}
threadname.o: ${LWP}/threadname.c
${CCRULE}
aclprocs.o: ${LIBACL}/aclprocs.c
${CCRULE}
netprocs.o: ${LIBACL}/netprocs.c
${CCRULE}
vldbint.cs.o: ${VLSERVER}/vldbint.cs.c
${CCRULE} -I${srcdir}/../vlserver
vldbint.xdr.o: ${VLSERVER}/vldbint.xdr.c
${CCRULE} -I${srcdir}/../vlserver
buffer.o: ${DIR}/buffer.c
${CCRULE}
dir.o: ${DIR}/dir.c
${CCRULE}
salvage.o: ${DIR}/salvage.c
${CCRULE}
vnode.o: ${VOL}/vnode.c
${CCRULE}
volume.o: ${VOL}/volume.c
${CCRULE}
vutil.o: ${VOL}/vutil.c
${CCRULE}
partition.o: ${VOL}/partition.c
${CCRULE}
vg_cache.o: ${VOL}/vg_cache.c
${CCRULE}
vg_scan.o: ${VOL}/vg_scan.c
${CCRULE}
fssync-server.o: ${VOL}/fssync-server.c
${CCRULE}
fssync-client.o: ${VOL}/fssync-client.c
${CCRULE}
salvsync-client.o: ${VOL}/salvsync-client.c
${CCRULE}
daemon_com.o: ${VOL}/daemon_com.c
${CCRULE}
clone.o: ${VOL}/clone.c
${CCRULE}
nuke.o: ${VOL}/nuke.c
${CCRULE}
devname.o: ${VOL}/devname.c
${CCRULE}
# only for darwin?
fstab.o: ${UTIL}/fstab.c
${CCRULE}
common.o: ${VOL}/common.c
${CCRULE}
listinodes.o: ${VOL}/listinodes.c
${CCRULE}
ihandle.o: ${VOL}/ihandle.c
${CCRULE}
namei_ops.o: ${VOL}/namei_ops.c
${CCRULE}
afsaux.o: ${FSINT}/afsaux.c
${CCRULE} -I../fsint
afscbint.cs.o: ${FSINT}/afscbint.cs.c
${CCRULE}
afscbint.ss.o: ${FSINT}/afscbint.ss.c
${CCRULE}
afsint.cs.o: ${FSINT}/afsint.cs.c
${CCRULE}
afsint.ss.o: ${FSINT}/afsint.ss.c
${CCRULE}
afsint.xdr.o: ${FSINT}/afsint.xdr.c
${CCRULE}
state_analyzer.o: ${TVICED}/state_analyzer.c
${CCRULE}
dafileserver: ${objects} ${LIBS}
${CC} ${LDFLAGS} -o dafileserver ${objects} ${LIBS} ${MT_LIBS} ${XLIBS}
state_analyzer: ${SDBGOBJS}
${CC} ${LDFLAGS} -o state_analyzer ${SDBGOBJS} ${MT_LIBS} ${XLIBS}
install: dafileserver state_analyzer
${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
${INSTALL} -d ${DESTDIR}${afssrvsbindir}
${INSTALL} dafileserver \
${DESTDIR}${afssrvlibexecdir}/dafileserver
${INSTALL_PROGRAM} state_analyzer \
${DESTDIR}${afssrvsbindir}/state_analyzer
dest: dafileserver state_analyzer
${INSTALL} -d ${DEST}/root.server/usr/afs/bin
${INSTALL} dafileserver \
${DEST}/root.server/usr/afs/bin/dafileserver
${INSTALL_PROGRAM} state_analyzer \
${DEST}/root.server/usr/afs/bin/state_analyzer
clean:
$(RM) -f *.o dafileserver state_analyzer core AFS_component_version_number.c
include ../config/Makefile.version

105
src/dviced/NTMakefile Normal file
View File

@ -0,0 +1,105 @@
# 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
AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG -DFSSYNC_BUILD_SERVER -DAFS_DEMAND_ATTACH_FS
RELDIR=dviced
!INCLUDE ..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\config\NTMakefile.version
SRC_DIR = ..\viced
############################################################################
# Build the fileserver
EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\dafileserver.exe
VICED = ..\viced
TVICED = .
LWP = ..\lwp
LIBACL = ..\libacl
DIR = ..\dir
FSINT = ..\fsint
RX = ..\rx
RXOBJS = $(OUT)\xdr_int64.obj \
$(OUT)\xdr_int32.obj
VICEDOBJS = $(OUT)\viced.obj $(OUT)\afsfileprocs.obj $(OUT)\host.obj $(OUT)\physio.obj $(OUT)\callback.obj
TVICEDRES = $(OUT)\dafileserver.res
TVICEDOBJS = $(OUT)\serialize_state.obj
LWPOBJS = $(OUT)\lock.obj $(OUT)\fasttime.obj $(OUT)\threadname.obj
LIBACLOBJS = $(OUT)\aclprocs.obj $(OUT)\netprocs.obj
DIROBJS = $(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj
FSINTOBJS = $(OUT)\afsaux.obj $(OUT)\afscbint.cs.obj $(OUT)\afsint.ss.obj $(OUT)\afsint.xdr.obj
EXEOBJS = $(VICEDOBJS) $(TVICEDRES) $(LWPOBJS) $(LIBACLOBJS) \
$(DIROBJS) $(FSINTOBJS) $(RXOBJS) #$(TVICEDOBJS)
noversion: install
all: dafileserver
$(RXOBJS): $(RX)\$$(@B).c
$(C2OBJ) -I$(RX) $**
$(VICEDOBJS): $(VICED)\$$(@B).c
$(C2OBJ) -I$(VICED) $**
$(TVICEDRES): $(VICED)\dafileserver.rc AFS_component_version_number.h
$(RC) /fo $(TVICEDRES) $(TVICED)\dafileserver.rc
$(TVICEDOBJS): $(TVICED)\$$(@B).c
$(C2OBJ) -I$(TVICED) $**
$(LWPOBJS): $(LWP)\$$(@B).C
$(C2OBJ) -I$(LWP) $**
$(LIBACLOBJS): $(LIBACL)\$$(@B).C
$(C2OBJ) -I$(LIBACL) $**
$(DIROBJS): $(DIR)\$$(@B).C
$(C2OBJ) -I$(DIR) $**
$(FSINTOBJS): $(FSINT)\$$(@B).C
$(C2OBJ) -I$(FSINT) $**
EXELIBS = \
$(DESTDIR)\lib\afsauthent.lib \
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afs\afscmd.lib \
$(DESTDIR)\lib\afs\afsaudit.lib \
$(DESTDIR)\lib/afs/afscom_err.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\mtafsutil.lib \
$(DESTDIR)\lib\afs\mtafsvol.lib \
$(DESTDIR)\lib\afs\mtafsvldb.lib \
$(DESTDIR)\lib\afspthread.lib
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK)
$(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(CODESIGN_USERLAND)
$(SYMSTORE_IMPORT)
install: $(EXEFILE)
mkdir:
clean::
$(DEL) $(TVICEDRES)

View File

@ -0,0 +1,17 @@
/*
* 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
*/
/* Define VERSIONINFO resource */
#define AFS_VERINFO_FILE_DESCRIPTION "AFS File Server (Demand Attach)"
#define AFS_VERINFO_NAME "dafileserver"
#define AFS_VERINFO_FILENAME "dafileserver.exe"
#include "AFS_component_version_number.h"
#include "..\config\NTVersioninfo.rc"

234
src/dvolser/Makefile.in Normal file
View File

@ -0,0 +1,234 @@
# 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
srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
HELPER_SPLINT=@HELPER_SPLINT@
CC=${MT_CC}
CFLAGS=${COMMON_CFLAGS} -DNINTERFACE ${MT_CFLAGS} -DRXDEBUG -DFSSYNC_BUILD_CLIENT -DAFS_DEMAND_ATTACH_FS
CCRULE=${CC} ${CFLAGS} -c $?
VICED=../viced
VLSERVER=../vlserver
LWP=../lwp
LIBACL=../libacl
UTIL=../util
DIR=../dir
VOL=../vol
FSINT=../fsint
VOLSER=../volser
RX=../rx
VOLSEROBJS=volmain.o volprocs.o physio.o voltrans.o volerr.o volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o vscommon.o vol_split.o
VLSERVEROBJS=vldbint.cs.o vldbint.xdr.o vl_errors.o
LWPOBJS=lock.o threadname.o
LIBACLOBJS=aclprocs.o netprocs.o
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
DIROBJS=buffer.o dir.o salvage.o
VOLOBJS= vnode.o volume.o vutil.o partition.o fssync-client.o purge.o \
clone.o devname.o common.o ihandle.o listinodes.o \
namei_ops.o nuke.o salvsync-client.o daemon_com.o
FSINTOBJS=# afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
RXOBJS=rx_pthread.o
objects= ${VOLSEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS} ${RXOBJS}
LIBS= ${TOP_LIBDIR}/libcmd.a \
${TOP_LIBDIR}/libafsauthent.a \
${TOP_LIBDIR}/libafsrpc.a \
${TOP_LIBDIR}/libafsutil.a \
${TOP_LIBDIR}/libusd.a
all: davolserver
COMPILE=${CC} ${CFLAGS} -c $?
rx_pthread.o: ${RX}/rx_pthread.c
${COMPILE} -DDPF_FSLOG
volmain.o: ${VOLSER}/volmain.c
${COMPILE} -I../volser
vol_split.o: ${VOLSER}/vol_split.c
${COMPILE} -I../volser
volprocs.o: ${VOLSER}/volprocs.c
${COMPILE} -I../volser
physio.o: ${VOLSER}/physio.c
${COMPILE}
voltrans.o: ${VOLSER}/voltrans.c
${COMPILE} -I../volser
volerr.o: ${VOLSER}/volerr.c
${COMPILE}
volint.cs.o: ${VOLSER}/volint.cs.c
${COMPILE}
dumpstuff.o: ${VOLSER}/dumpstuff.c
${COMPILE} -I../volser
volint.ss.o: ${VOLSER}/volint.ss.c
${COMPILE}
volint.xdr.o: ${VOLSER}/volint.xdr.c
${COMPILE}
vsprocs.o: ${VOLSER}/vsprocs.c
${COMPILE}
vsutils.o: ${VOLSER}/vsutils.c
${COMPILE}
lockprocs.o: ${VOLSER}/lockprocs.c
${COMPILE}
assert.o: ${UTIL}/assert.c
${COMPILE}
uuid.o: ${UTIL}/uuid.c
${COMPILE}
serverLog.o: ${UTIL}/serverLog.c
${COMPILE}
fileutil.o: ${UTIL}/fileutil.c
${COMPILE}
volparse.o: ${UTIL}/volparse.c
${COMPILE}
flipbase64.o: ${UTIL}/flipbase64.c
${COMPILE}
netutils.o: ${UTIL}/netutils.c
${COMPILE} -I../util
dirpath.o: ${UTIL}/dirpath.c
${COMPILE}
softsig.o: ${UTIL}/softsig.c
${COMPILE}
lock.o: ${LWP}/lock.c
${COMPILE}
threadname.o: ${LWP}/threadname.c
${COMPILE}
aclprocs.o: ${LIBACL}/aclprocs.c
${COMPILE}
netprocs.o: ${LIBACL}/netprocs.c
${COMPILE}
vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
$(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${VLSERVER} vl_errors -h vlserver
vl_errors.o: vl_errors.c
${COMPILE}
vldbint.cs.o: ${VLSERVER}/vldbint.cs.c
${COMPILE}
vldbint.xdr.o: ${VLSERVER}/vldbint.xdr.c
${COMPILE}
buffer.o: ${DIR}/buffer.c
${COMPILE}
dir.o: ${DIR}/dir.c
${COMPILE}
salvage.o: ${DIR}/salvage.c
${COMPILE}
vnode.o: ${VOL}/vnode.c
${COMPILE}
volume.o: ${VOL}/volume.c
${COMPILE}
vutil.o: ${VOL}/vutil.c
${COMPILE}
partition.o: ${VOL}/partition.c
${COMPILE}
nuke.o: ${VOL}/nuke.c
${COMPILE}
fssync-client.o: ${VOL}/fssync-client.c
${COMPILE}
salvsync-client.o: ${VOL}/salvsync-client.c
${COMPILE}
daemon_com.o: ${VOL}/daemon_com.c
${COMPILE}
purge.o: ${VOL}/purge.c
${COMPILE}
clone.o: ${VOL}/clone.c
${COMPILE}
devname.o: ${VOL}/devname.c
${COMPILE}
common.o: ${VOL}/common.c
${COMPILE}
vscommon.o: ${VOLSER}/common.c
${COMPILE} -o vscommon.o
listinodes.o: ${VOL}/listinodes.c
${COMPILE}
ihandle.o: ${VOL}/ihandle.c
${COMPILE}
namei_ops.o: ${VOL}/namei_ops.c
${COMPILE}
afsaux.o: ${FSINT}/afsaux.c
${COMPILE}
afscbint.cs.o: ${FSINT}/afscbint.cs.c
${COMPILE}
afscbint.ss.o: ${FSINT}/afscbint.ss.c
${COMPILE}
afsint.cs.o: ${FSINT}/afsint.cs.c
${COMPILE}
afsint.ss.o: ${FSINT}/afsint.ss.c
${COMPILE}
afsint.xdr.o: ${FSINT}/afsint.xdr.c
${COMPILE}
davolserver: ${objects} ${LIBS}
${CC} ${LDFLAGS} -o davolserver ${objects} ${LIBS} ${MT_LIBS} ${XLIBS}
install: davolserver
${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
${INSTALL} davolserver ${DESTDIR}${afssrvlibexecdir}/davolserver
dest: davolserver
${INSTALL} -d ${DEST}/root.server/usr/afs/bin
${INSTALL} davolserver ${DEST}/root.server/usr/afs/bin/davolserver
clean:
$(RM) -f *.o davolserver core AFS_component_version_number.c
include ../config/Makefile.version

164
src/dvolser/NTMakefile Normal file
View File

@ -0,0 +1,164 @@
# 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
AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG -DFSSYNC_BUILD_CLIENT -DAFS_DEMAND_ATTACH_FS
RELDIR=dvolser
!INCLUDE ..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\config\NTMakefile.version
SRC_DIR = ..\volser
VOLSER = ..\volser
TVOLSER = .
VLSERVER = ..\vlserver
LWP = ..\lwp
LIBACL = ..\libacl
UTIL = ..\util
DIR = ..\dir
VOL = ..\vol
FSINT = ..\fsint
RX = ..\rx
############################################################################
# Definitions for installing header files
INCFILEDIR = $(DESTDIR)\include\afs # header file install directory
INCFILES = \
$(INCFILEDIR)\volser_prototypes.h \
$(INCFILEDIR)\volser.h \
$(INCFILEDIR)\volint.h
LOCAL_INCFILES = \
volser.h \
volint.h
############################################################################
# Build afstvolser.lib
LIBFILE = $(DESTDIR)\lib\afs\afstvolser.lib
LIBOBJS = $(OUT)\volint.cs.obj \
$(OUT)\vsprocs.obj \
$(OUT)\vsutils.obj \
$(OUT)\lockprocs.obj \
$(OUT)\volint.xdr.obj \
$(OUT)\volerr.obj \
$(OUT)\volint.ss.obj \
$(OUT)\AFS_component_version_number.obj
$(LIBOBJS): $(VOLSER)\$$(@B).c
$(C2OBJ) -I$(TVOLSER) -I$(UTIL) $**
$(LIBFILE): $(LIBOBJS)
$(LIBARCH)
############################################################################
# Build davolserver
VOLSERVER_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\davolserver.exe
VOLSEROBJS=$(OUT)\volmain.obj $(OUT)\volprocs.obj $(OUT)\physio.obj $(OUT)\voltrans.obj $(OUT)\dumpstuff.obj
LWPOBJS=$(OUT)\lock.obj $(OUT)\threadname.obj $(OUT)\fasttime.obj
LIBACLOBJS=$(OUT)\aclprocs.obj $(OUT)\netprocs.obj
DIROBJS=$(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj
VOLSERVER_EXEOBJS = $(VOLSEROBJS) \
$(VLSERVEROBJS) \
$(LWPOBJS) \
$(LIBACLOBJS) \
$(DIROBJS) \
$(FSINTOBJS) \
$(OUT)\vscommon.obj \
$(OUT)\davolserver.res
VOLSERVER_EXELIBS = \
$(DESTDIR)\lib\afsauthent.lib \
$(DESTDIR)\lib\afsrpc.lib \
$(DESTDIR)\lib\afs\afstvolser.lib \
$(DESTDIR)\lib\afs\mtafsvol.lib \
$(DESTDIR)\lib\afs\afscmd.lib \
$(DESTDIR)\lib\afs\afsaudit.lib \
$(DESTDIR)\lib/afs/afscom_err.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\mtafsutil.lib \
$(DESTDIR)\lib\afspthread.lib
$(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
$(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(CODESIGN_USERLAND)
$(SYMSTORE_IMPORT)
$(OUT)\vscommon.obj: $(VOLSER)\common.c
$(C2OBJ) /Fo$(OUT)\vscommon.obj -I$(VOLSER) -I$(UTIL) $**
$(VOLSEROBJS): $(VOLSER)\$$(@B).c
$(C2OBJ) -I$(VOLSER) -I$(UTIL) $**
$(LWPOBJS): $(LWP)\$$(@B).C
$(C2OBJ) -I$(LWP) $**
$(LIBACLOBJS): $(LIBACL)\$$(@B).C
$(C2OBJ) -I$(LIBACL) $**
$(DIROBJS): $(DIR)\$$(@B).C
$(C2OBJ) -I$(DIR) $**
############################################################################
# Generate versioninfo resources
$(OUT)\davolserver.res: AFS_component_version_number.h
############################################################################
# Definitions for generating files via RXGEN
volint.cs.c: $(VOLSER)\volint.xg volint.h
$(RXGEN) -x -C -o $@ $(VOLSER)\volint.xg
volint.ss.c: $(VOLSER)\volint.xg volint.h
$(RXGEN) -x -S -o $@ $(VOLSER)\volint.xg
volint.xdr.c: $(VOLSER)\volint.xg volint.h
$(RXGEN) -x -c -o $@ $(VOLSER)\volint.xg
volint.h: $(VOLSER)\volint.xg
$(RXGEN) -x -h -o $@ $(VOLSER)\volint.xg
############################################################################
# Definitions for generating files via COMPILE_ET
volser.h volerr.c: $(VOLSER)\volerr.et $(VOLSER)\volser.p.h
$(DEL) volerr.c volser.h
$(COPY) $(VOLSER)\volerr.et .
$(COPY) $(VOLSER)\volser.p.h .
$(COMPILE_ET) volerr -h volser
############################################################################
# Install target; primary makefile target
install_lib: $(LIBFILE)
install: install_lib $(VOLSERVER_EXEFILE) $(CL_VOS_EXEFILE) \
$(INCFILES)
############################################################################
# Local clean target; augments predefined clean target
clean::
$(DEL) volerr.c volser.h volerr.et volser.p.h $(INCFILES)
$(DEL) volint.cs.c volint.h volint.ss.c volint.xdr.c
mkdir:

View File

@ -0,0 +1,17 @@
/*
* 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
*/
/* Define VERSIONINFO resource */
#define AFS_VERINFO_FILE_DESCRIPTION "AFS Volume Server (Threaded)"
#define AFS_VERINFO_NAME "volserver"
#define AFS_VERINFO_FILENAME "volserver.exe"
#include "AFS_component_version_number.h"
#include "..\config\NTVersioninfo.rc"

View File

@ -16,10 +16,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
CC=${MT_CC}
CFLAGS=${COMMON_CFLAGS} -I.. -DNINTERFACE ${MT_CFLAGS} -DRXDEBUG -DFSSYNC_BUILD_CLIENT \
-DSALVSYNC_BUILD_SERVER -DSALVSYNC_BUILD_CLIENT
CFLAGS=${COMMON_CFLAGS} -I.. -DNINTERFACE ${MT_CFLAGS} $(CFLAGS_NOERROR) -DRXDEBUG -DFSSYNC_BUILD_CLIENT \
-DSALVSYNC_BUILD_SERVER -DSALVSYNC_BUILD_CLIENT -DAFS_DEMAND_ATTACH_FS
SCFLAGS=${COMMON_CFLAGS} -I.. -DNINTERFACE ${XCFLAGS} ${ARCHFLAGS} $(CFLAGS_NOERROR) -DRXDEBUG -DFSSYNC_BUILD_CLIENT
CCRULE=${CC} ${CFLAGS} -c $?
SCCRULE=${CC} ${SCFLAGS} -c $? -o $@
VICED=../viced
VLSERVER=../vlserver
@ -31,6 +33,7 @@ VOL=../vol
FSINT=../fsint
SALVAGEDOBJS=salvaged.o vol-salvage.o physio.o
SALVAGEROBJS=salvager.o svol-salvage.o sphysio.o
DIROBJS=buffer.o dir.o salvage.o
@ -38,12 +41,12 @@ LWPOBJS=lock.o threadname.o
UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o fstab.o
VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync-client.o \
VLIBOBJS=volume.o vnode.o vutil.o partition.o fssync-client.o \
clone.o nuke.o devname.o listinodes.o ihandle.o \
namei_ops.o salvsync-server.o salvsync-client.o \
daemon_com.o
namei_ops.o salvsync-server.o salvsync-client.o daemon_com.o
OBJECTS= ${SALVAGEDOBJS} ${UTILOBJS} ${VLIBOBJS} ${DIROBJS} ${LWPOBJS}
SOBJECTS= ${SALVAGEROBJS}
FSSDEBUG_OBJS = fssync-debug.o physio.o common.o ${UTILOBJS} ${VLIBOBJS} ${DIROBJS} ${LWPOBJS}
@ -51,17 +54,30 @@ SSSDEBUG_OBJS = salvsync-debug.o physio.o common.o ${UTILOBJS} ${VLIBOBJS} ${DIR
LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libcmd.a
all: salvageserver fssync-debug salvsync-debug
SLIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
${TOP_LIBDIR}/libvlib.a ${TOP_LIBDIR}/liblwp.a \
${TOP_LIBDIR}/libacl.a ${TOP_LIBDIR}/util.a
all: salvageserver fssync-debug salvsync-debug dasalvager
salvaged.o: ${VOL}/salvaged.c
${CCRULE}
salvager.o: ${VOL}/salvager.c
${SCCRULE}
vol-salvage.o: ${VOL}/vol-salvage.c
${CCRULE}
svol-salvage.o: ${VOL}/vol-salvage.c
${SCCRULE}
physio.o: ${VOL}/physio.c
${CCRULE}
sphysio.o: ${VOL}/physio.c
${SCCRULE}
fssync-debug.o: ${VOL}/fssync-debug.c
${CCRULE}
@ -162,15 +178,20 @@ namei_ops.o: ${VOL}/namei_ops.c
salvageserver: ${OBJECTS} ${LIBS}
${CC} ${LDFLAGS} -o salvageserver ${OBJECTS} ${LIBS} ${MT_LIBS} ${XLIBS}
dasalvager: ${SOBJECTS} ${SLIBS}
${CC} ${LDFLAGS} -o dasalvager ${SOBJECTS} ${SLIBS} ${XLIBS}
fssync-debug: ${FSSDEBUG_OBJS} ${LIBS}
${CC} ${LDFLAGS} -o fssync-debug ${FSSDEBUG_OBJS} ${LIBS} ${MT_LIBS} ${XLIBS}
salvsync-debug: ${SSSDEBUG_OBJS} ${LIBS}
${CC} ${LDFLAGS} -o salvsync-debug ${SSSDEBUG_OBJS} ${LIBS} ${MT_LIBS} ${XLIBS}
install: salvageserver fssync-debug salvsync-debug
install: salvageserver fssync-debug salvsync-debug dasalvager
${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
${INSTALL} -d ${DESTDIR}${afssrvsbindir}
${INSTALL_PROGRAM} dasalvager \
${DESTDIR}${afssrvlibexecdir}/dasalvager
${INSTALL_PROGRAM} salvageserver \
${DESTDIR}${afssrvlibexecdir}/salvageserver
${INSTALL_PROGRAM} fssync-debug \
@ -178,8 +199,10 @@ install: salvageserver fssync-debug salvsync-debug
${INSTALL_PROGRAM} salvsync-debug \
${DESTDIR}${afssrvsbindir}/salvsync-debug
dest: salvageserver fssync-debug salvsync-debug
dest: salvageserver fssync-debug salvsync-debug dasalvager
${INSTALL} -d ${DEST}/root.server/usr/afs/bin
${INSTALL_PROGRAM} dasalvager \
${DEST}/root.server/usr/afs/bin/dasalvager
${INSTALL_PROGRAM} salvageserver \
${DEST}/root.server/usr/afs/bin/salvageserver
${INSTALL_PROGRAM} fssync-debug \
@ -188,6 +211,6 @@ dest: salvageserver fssync-debug salvsync-debug
${DEST}/root.server/usr/afs/bin/salvsync-debug
clean:
$(RM) -f *.o salvageserver core AFS_component_version_number.c fssync-debug salvsync-debug
$(RM) -f *.o salvageserver core AFS_component_version_number.c fssync-debug salvsync-debug dasalvager
include ../config/Makefile.version

View File

@ -52,11 +52,9 @@ RXOBJS = rx_pthread.o
objects= ${VICEDOBJS} ${VLSERVEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS} ${RXOBJS}
SDBGOBJS = state_analyzer.o uuid.o dirpath.o fileutil.o ${TOP_LIBDIR}/util.a
LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.a
all: fileserver state_analyzer
all: fileserver
rx_pthread.o: ${RX}/rx_pthread.c
${CCRULE} -DDPF_FSLOG
@ -206,31 +204,21 @@ afsint.ss.o: ${FSINT}/afsint.ss.c
afsint.xdr.o: ${FSINT}/afsint.xdr.c
${CCRULE}
state_analyzer.o: state_analyzer.c
${CCRULE}
fileserver: ${objects} ${LIBS}
${CC} ${LDFLAGS} -o fileserver ${objects} ${LIBS} ${MT_LIBS} ${XLIBS}
state_analyzer: ${SDBGOBJS}
${CC} ${LDFLAGS} -o state_analyzer ${SDBGOBJS} ${MT_LIBS} ${XLIBS}
install: fileserver state_analyzer
install: fileserver
${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
${INSTALL} -d ${DESTDIR}${afssrvsbindir}
${INSTALL} fileserver \
${DESTDIR}${afssrvlibexecdir}/fileserver
${INSTALL_PROGRAM} state_analyzer \
${DESTDIR}${afssrvsbindir}/state_analyzer
dest: fileserver state_analyzer
dest: fileserver
${INSTALL} -d ${DEST}/root.server/usr/afs/bin
${INSTALL} fileserver \
${DEST}/root.server/usr/afs/bin/fileserver
${INSTALL_PROGRAM} state_analyzer \
${DEST}/root.server/usr/afs/bin/state_analyzer
clean:
$(RM) -f *.o fileserver state_analyzer core AFS_component_version_number.c
$(RM) -f *.o fileserver core AFS_component_version_number.c
include ../config/Makefile.version

17
src/tviced/fileserver.rc Normal file
View File

@ -0,0 +1,17 @@
/*
* 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
*/
/* Define VERSIONINFO resource */
#define AFS_VERINFO_FILE_DESCRIPTION "AFS File Server (Threaded)"
#define AFS_VERINFO_NAME "fileserver"
#define AFS_VERINFO_FILENAME "fileserver.exe"
#include "AFS_component_version_number.h"
#include "..\config\NTVersioninfo.rc"

View File

@ -132,10 +132,6 @@ install: vlib.a salvager volinfo fssync-debug
${INSTALL_DATA} daemon_com.h ${DESTDIR}${includedir}/afs/daemon_com.h
${INSTALL_DATA} ihandle.h ${DESTDIR}${includedir}/afs/ihandle.h
${INSTALL_DATA} namei_ops.h ${DESTDIR}${includedir}/afs/namei_ops.h
set -x; if test "@DEMAND_ATTACH@" = "no" ; then \
${INSTALL_PROGRAM} fssync-debug \
${DESTDIR}${afssrvsbindir}/fssync-debug ; \
fi
set -x; if test x"$(install_XFS_SIZE_CHECK)" != x"" ; then \
${INSTALL_PROGRAM} xfs_size_check \
${DESTDIR}${afssrvsbindir}/xfs_size_check ; \
@ -162,10 +158,6 @@ dest: vlib.a salvager volinfo fssync-debug
${INSTALL_DATA} daemon_com.h ${DEST}/include/afs/daemon_com.h
${INSTALL_DATA} ihandle.h ${DEST}/include/afs/ihandle.h
${INSTALL_DATA} namei_ops.h ${DEST}/include/afs/namei_ops.h
set -x; if test "@DEMAND_ATTACH@" = "no" ; then \
${INSTALL_PROGRAM} fssync-debug \
${DEST}/root.server/usr/afs/bin/fssync-debug ; \
fi
set -x; if test x"$(install_XFS_SIZE_CHECK)" != x"" ; then \
${INSTALL_PROGRAM} xfs_size_check \
$(DEST)/root.server/usr/afs/bin/xfs_size_check ; \

View File

@ -114,6 +114,7 @@ ListViceInodes(char *devname, char *mountedOn, FILE *inodeFile,
#include "volinodes.h"
#include "partition.h"
#include "fssync.h"
#include "volume_inline.h"
/*@+fcnmacros +macrofcndecl@*/
#ifdef O_LARGEFILE
@ -1403,9 +1404,23 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
char buffer[128];
struct specino specinos[VI_LINKTABLE+1];
Inode nearInode = 0;
# ifdef AFS_DEMAND_ATTACH_FS
int locktype = 0;
# endif /* AFS_DEMAND_ATTACH_FS */
int code = 0;
memset(&specinos, 0, sizeof(specinos));
/* now do the work */
for (partP = DiskPartitionList; partP && strcmp(partP->name, pname);
partP = partP->next);
if (!partP) {
Log("1 inode_ConvertROtoRWvolume: Couldn't find DiskPartition for %s\n", pname);
code = EIO;
goto done;
}
#ifdef AFS_DEMAND_ATTACH_FS
/* DAFS currently doesn't really work with inode, so don't bother putting the
* locking code here right now. But in case someday someone makes DAFS work
@ -1414,18 +1429,15 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
* trying to do, take a look at VLockVolumeByIdNB, and
* namei_ConvertROtoRWvolume.
*/
# error must lock volumes before ConvertROtoRW is usable on DAFS inode
locktype = VVolLockType(V_VOLUPD, 1);
code = VLockVolumeByIdNB(volumeId, partP, locktype);
if (code) {
locktype = 0;
code = EIO;
goto done;
}
#endif
/* now do the work */
for (partP = DiskPartitionList; partP && strcmp(partP->name, pname);
partP = partP->next);
if (!partP) {
Log("1 inode_ConvertROtoRWvolume: Couldn't find DiskPartition for %s\n", pname);
return EIO;
}
if (VReadVolumeDiskHeader(volumeId, partP, &h)) {
Log("1 inode_ConvertROtoRWvolume: Couldn't read header for RO-volume %lu.\n",
afs_printable_uint32_lu(volumeId));
@ -1442,7 +1454,8 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
&forcep, 0, wpath, &specinos)) < 0)
{
Log("1 inode_ConvertROtoRWvolume: Couldn't get special inodes\n");
return EIO;
code = EIO;
goto done;
}
#if defined(NEARINODE_HINT)
@ -1460,14 +1473,16 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
fdP = IH_OPEN(ih);
if (!fdP) {
Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, volumeId);
return -1;
code = -1;
goto done;
}
IH_INIT(ih2, partP->device, h.parent, specinos[j].ninodeNumber);
fdP2 = IH_OPEN(ih2);
if (!fdP2) {
Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, h.parent);
return -1;
code = -1;
goto done;
}
if (j == VI_VOLINFO)
@ -1480,8 +1495,10 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
if (len == 0)
break;
nBytes = write(fdP2->fd_fd, buffer, len);
if (nBytes != len)
return -1;
if (nBytes != len) {
code = -1;
goto done;
}
}
}
@ -1524,7 +1541,8 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
if (VCreateVolumeDiskHeader(&h, partP)) {
Log("1 inode_ConvertROtoRWvolume: Couldn't write header for RW-volume %lu\n",
afs_printable_uint32_lu(h.id));
return EIO;
code = EIO;
goto done;
}
if (VDestroyVolumeDiskHeader(partP, volumeId, h.parent)) {
@ -1534,7 +1552,14 @@ inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
FSYNC_VolOp(volumeId, pname, FSYNC_VOL_DONE, 0, NULL);
FSYNC_VolOp(h.id, pname, FSYNC_VOL_ON, 0, NULL);
return 0;
done:
# ifdef AFS_DEMAND_ATTACH_FS
if (locktype) {
VUnlockVolumeById(volumeId, partP);
}
# endif /* AFS_DEMAND_ATTACH_FS */
return code;
}
#endif /* FSSYNC_BUILD_CLIENT */
#endif /* AFS_NAMEI_ENV */