[Ocfs-commits]
rev 8 - in branches/ocfs-1.0: . ocfs2 ocfs2/Common ocfs2/Common/inc
ocfs2/Linux ocfs2/Linux/inc ocfs2/Support redhat tools/debugocfs
tools/format tools/ocfs_uid_gen tools/ocfstool tools/sizetest
unitedlinux
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Sep 2 20:55:06 CDT 2003
Author: manish
Date: 2003-09-02 19:55:02 -0500 (Tue, 02 Sep 2003)
New Revision: 8
Added:
branches/ocfs-1.0/makeallsuse
branches/ocfs-1.0/redhat/ocfs-2.4.18-e.spec.in
branches/ocfs-1.0/tools/sizetest/disk.txt
branches/ocfs-1.0/tools/sizetest/diskstructs.c
branches/ocfs-1.0/tools/sizetest/net.txt
branches/ocfs-1.0/tools/sizetest/netstructs.c
branches/ocfs-1.0/tools/sizetest/sizetest.h
branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in
branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB.spec.in
Modified:
branches/ocfs-1.0/Config.make.in
branches/ocfs-1.0/Makefile
branches/ocfs-1.0/config.guess
branches/ocfs-1.0/config.sub
branches/ocfs-1.0/configure.in
branches/ocfs-1.0/ocfs2/Common/inc/ocfs.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfscom.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsconst.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsdef.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsdisk.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsdlm.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfserr.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsgendlm.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsgenmisc.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfstrace.h
branches/ocfs-1.0/ocfs2/Common/inc/ocfsvol.h
branches/ocfs-1.0/ocfs2/Common/ocfsgenalloc.c
branches/ocfs-1.0/ocfs2/Common/ocfsgencreate.c
branches/ocfs-1.0/ocfs2/Common/ocfsgendirnode.c
branches/ocfs-1.0/ocfs2/Common/ocfsgendlm.c
branches/ocfs-1.0/ocfs2/Common/ocfsgenmisc.c
branches/ocfs-1.0/ocfs2/Common/ocfsgennm.c
branches/ocfs-1.0/ocfs2/Common/ocfsgentrans.c
branches/ocfs-1.0/ocfs2/Common/ocfsgenvote.c
branches/ocfs-1.0/ocfs2/Common/ocfsheartbeat.c
branches/ocfs-1.0/ocfs2/Common/ocfsver.c
branches/ocfs-1.0/ocfs2/Linux/inc/ocfsmain.h
branches/ocfs-1.0/ocfs2/Linux/ocfsbitmap.c
branches/ocfs-1.0/ocfs2/Linux/ocfsdlm.c
branches/ocfs-1.0/ocfs2/Linux/ocfsfile.c
branches/ocfs-1.0/ocfs2/Linux/ocfsioctl.c
branches/ocfs-1.0/ocfs2/Linux/ocfsiosup.c
branches/ocfs-1.0/ocfs2/Linux/ocfsmain.c
branches/ocfs-1.0/ocfs2/Linux/ocfsmount.c
branches/ocfs-1.0/ocfs2/Linux/ocfsport.c
branches/ocfs-1.0/ocfs2/Linux/ocfsproc.c
branches/ocfs-1.0/ocfs2/Makefile
branches/ocfs-1.0/ocfs2/Support/divdi3.c
branches/ocfs-1.0/redhat/Makefile
branches/ocfs-1.0/redhat/ocfs-2.4.9-e.spec.in
branches/ocfs-1.0/redhat/ocfs.init
branches/ocfs-1.0/tools/debugocfs/Makefile
branches/ocfs-1.0/tools/debugocfs/debugocfs.c
branches/ocfs-1.0/tools/debugocfs/debugocfs.h
branches/ocfs-1.0/tools/debugocfs/dummy.c
branches/ocfs-1.0/tools/debugocfs/dummy.h
branches/ocfs-1.0/tools/debugocfs/extfinder.c
branches/ocfs-1.0/tools/debugocfs/io.c
branches/ocfs-1.0/tools/debugocfs/main.c
branches/ocfs-1.0/tools/debugocfs/ocfsmalloc.c
branches/ocfs-1.0/tools/debugocfs/print.c
branches/ocfs-1.0/tools/format/Makefile
branches/ocfs-1.0/tools/format/format.c
branches/ocfs-1.0/tools/format/frmtport.c
branches/ocfs-1.0/tools/ocfs_uid_gen/ocfs_uid_gen
branches/ocfs-1.0/tools/ocfstool/Makefile
branches/ocfs-1.0/tools/ocfstool/ocfsgenconfig.c
branches/ocfs-1.0/tools/ocfstool/ocfsguiutil.c
branches/ocfs-1.0/tools/sizetest/Makefile
branches/ocfs-1.0/tools/sizetest/sizetest.c
branches/ocfs-1.0/unitedlinux/Makefile
branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in
branches/ocfs-1.0/unitedlinux/ocfs.init
Log:
tree sync
Modified: branches/ocfs-1.0/Config.make.in
===================================================================
--- branches/ocfs-1.0/Config.make.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/Config.make.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -43,6 +43,8 @@
KVER = @KVER@
+HAVE_NPTL = @HAVE_NPTL@
+
MODULEDIR = @MODULEDIR@
MODVERSIONS = @MODVERSIONS@
@@ -55,6 +57,7 @@
LIBDEBUGOCFS = @LIBDEBUGOCFS@
OCFS_DEBUG = @OCFS_DEBUG@
+OCFS_AIO = @OCFS_AIO@
OCFS_MEMDEBUG = @OCFS_MEMDEBUG@
OCFS_TRACE = @OCFS_TRACE@
OCFS_PROCESSOR = @OCFS_PROCESSOR@
Modified: branches/ocfs-1.0/Makefile
===================================================================
--- branches/ocfs-1.0/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -34,15 +34,34 @@
rhas_srpm: dist
rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/redhat/ocfs-2.4.9-e.spec
+rhasia64_srpm: dist
+ rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/redhat/ocfs-2.4.18-e.spec
+
rhas_rpm: rhas_srpm
rpm --rebuild --target i686 "ocfs-2.4.9-e-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
-ul_srpm: dist
+rhasia64_rpm: rhasia64_srpm
+ rpm --rebuild --target ia64 "ocfs-2.4.18-e-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+
+ul64gb_srpm: dist
rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-64GB-SMP.spec
-ul_rpm: ul_srpm
- rpm --rebuild --target i586 "ocfs-2.4.19-64GB-SMP-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+ul64gb_rpm: ul64gb_srpm
+ rpm --rebuild --target i586 "ocfs-2.4.19-64GB-SMP-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+
+ul4gbsmp_srpm: dist
+ rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-4GB-SMP.spec
+
+ul4gbsmp_rpm: ul4gbsmp_srpm
+ rpm --rebuild --target i586 "ocfs-2.4.19-4GB-SMP-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+
+ul4gb_srpm: dist
+ rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-4GB.spec
+
+ul4gb_rpm: ul4gb_srpm
+ rpm --rebuild --target i586 "ocfs-2.4.19-4GB-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
+
distclean: clean
rm -f Config.make config.status config.cache config.log
Modified: branches/ocfs-1.0/config.guess
===================================================================
--- branches/ocfs-1.0/config.guess 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/config.guess 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-05-29'
+timestamp='2003-05-19'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -88,30 +88,41 @@
exit 1
fi
+trap 'exit 1' 1 2 15
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
-# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c ;
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi at noc.rutgers.edu 1994-08-24)
@@ -168,7 +179,18 @@
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -217,63 +239,47 @@
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- eval $set_cc_for_build
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -314,6 +320,10 @@
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -420,18 +430,20 @@
exit (-1);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS)
+ Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
@@ -504,8 +516,7 @@
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -603,11 +614,21 @@
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -641,8 +662,7 @@
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -700,15 +720,15 @@
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@@ -724,8 +744,19 @@
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
- *:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -737,13 +768,16 @@
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
- echo i386-pc-interix3
+ echo i586-pc-interix3
exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -763,6 +797,9 @@
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -786,9 +823,27 @@
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- rm -f $dummy.c
- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit 0 ;;
@@ -849,7 +904,7 @@
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
@@ -882,7 +937,6 @@
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -900,6 +954,23 @@
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -934,9 +1005,6 @@
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -960,9 +1028,15 @@
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -979,9 +1053,6 @@
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1053,6 +1124,9 @@
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
@@ -1060,7 +1134,11 @@
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ case `uname -p` in
+ *86) UNAME_PROCESSOR=i686 ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1073,7 +1151,7 @@
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1096,11 +1174,6 @@
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1119,12 +1192,6 @@
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1245,8 +1312,7 @@
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
Modified: branches/ocfs-1.0/config.sub
===================================================================
--- branches/ocfs-1.0/config.sub 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/config.sub 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2002-06-21'
+timestamp='2003-05-09'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -229,7 +229,7 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
+ | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -239,21 +239,25 @@
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
+ | mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
@@ -292,7 +296,7 @@
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -307,25 +311,31 @@
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipstx39 | mipstx39el \
- | none-* | np1-* | ns16k-* | ns32k-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | msp430-* \
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -363,6 +373,9 @@
basic_machine=a29k-none
os=-bsd
;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -712,6 +725,10 @@
np1)
basic_machine=np1-gould
;;
+ nv1)
+ basic_machine=nv1-cray
+ os=-unicosmp
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -745,13 +762,13 @@
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86 | athlon)
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
@@ -772,22 +789,22 @@
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
- ;;
+ ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
- ;;
+ ;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -818,6 +835,12 @@
basic_machine=a29k-amd
os=-udi
;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
sequent)
basic_machine=i386-sequent
;;
@@ -883,7 +906,7 @@
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
+ sv1)
basic_machine=sv1-cray
os=-unicos
;;
@@ -891,10 +914,6 @@
basic_machine=i386-sequent
os=-dynix
;;
- t3d)
- basic_machine=alpha-cray
- os=-unicos
- ;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@@ -903,10 +922,22 @@
basic_machine=t90-cray
os=-unicos
;;
+ tic4x | c4x*)
+ basic_machine=tic4x-unknown
+ os=-coff
+ ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -941,8 +972,8 @@
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -963,11 +994,7 @@
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
- xps | xps100)
+ xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
@@ -1013,7 +1040,7 @@
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
@@ -1022,7 +1049,7 @@
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -1037,10 +1064,6 @@
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1103,11 +1126,12 @@
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1119,8 +1143,10 @@
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1172,7 +1198,7 @@
os=-rtmk-nova
;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1211,9 +1237,15 @@
-xenix)
os=-xenix
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
-none)
;;
*)
@@ -1249,7 +1281,7 @@
pdp10-*)
os=-tops20
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1342,19 +1374,19 @@
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
Modified: branches/ocfs-1.0/configure.in
===================================================================
--- branches/ocfs-1.0/configure.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/configure.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -8,11 +8,11 @@
# Adjust these for the software version.
MAJOR_VERSION=1
MINOR_VERSION=0
-MICRO_VERSION=8
+MICRO_VERSION=9
EXTRA_VERSION=PROD
# Adjust this only to bump the RPM packaging version
-RPM_VERSION=4
+RPM_VERSION=5
DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
VERSION=$DIST_VERSION-$EXTRA_VERSION
@@ -39,11 +39,14 @@
esac
case "$host_cpu" in
+ ia64)
+ OCFS_PROCESSOR="ia64"
+ ;;
x86_64)
OCFS_PROCESSOR="x86_64"
;;
- i686)
- CFLAGS="-g -O2"
+ i386|i486|i586|i686|i786|k6|k7)
+ OCFS_PROCESSOR="i686"
;;
*)
AC_MSG_ERROR([not configured for "$host_cpu"])
@@ -74,6 +77,13 @@
fi
AC_SUBST(OCFS_DEBUG)
+AC_ARG_ENABLE(aio, [ --enable-aio=[yes/no] Turn on aio [default=yes]],,enable_aio=yes)
+OCFS_AIO=yes
+if test "x$enable_aio" = "xno"; then
+ OCFS_AIO=
+fi
+AC_SUBST(OCFS_AIO)
+
AC_ARG_ENABLE(memdebug, [ --enable-mem-debug=[yes/no] Turn on memory debugging [default=no]],,enable_memdebug=no)
OCFS_MEMDEBUG=
if test "x$enable_memdebug" = "xyes"; then
@@ -164,6 +174,36 @@
fi
AC_SUBST(KVER)
+AC_MSG_CHECKING([whether to build aio])
+if test "x$OCFS_AIO" = "xyes"; then
+ if egrep "EXPORT_SYMBOL.*\(brw_kvec_async\);" "$kerneldir/kernel/ksyms.c" >/dev/null 2>&1; then
+ have_aio=yes
+ else
+ have_aio=no
+ fi
+
+ AC_MSG_RESULT($have_aio)
+
+ if test "x$have_aio" = "xno"; then
+ OCFS_AIO=
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING([for NPTL support])
+AC_TRY_COMPILE(
+[#define __KERNEL__ 1
+#include <linux/sched.h>],
+[recalc_sigpending ();], have_NPTL=yes, have_NPTL=no)
+AC_MSG_RESULT($have_NPTL)
+
+HAVE_NPTL=
+if test "x$have_NPTL" = "xyes"; then
+ HAVE_NPTL=yes
+fi
+AC_SUBST(HAVE_NPTL)
+
AC_MSG_CHECKING([for kernel module symbol versions])
AC_EGREP_CPP(kernel_has_modversions,
[#include <linux/autoconf.h>
@@ -223,5 +263,8 @@
tools/cdslctl/cdslctl.1
tools/ocfstool/ocfstool.1
redhat/ocfs-2.4.9-e.spec
+redhat/ocfs-2.4.18-e.spec
unitedlinux/ocfs-2.4.19-64GB-SMP.spec
+unitedlinux/ocfs-2.4.19-4GB-SMP.spec
+unitedlinux/ocfs-2.4.19-4GB.spec
])
Added: branches/ocfs-1.0/makeallsuse
===================================================================
--- branches/ocfs-1.0/makeallsuse 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/makeallsuse 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,12 @@
+make clean
+./autogen.sh --with-kernel=/usr/src/linux-2.4.19-64GB-SMP --enable-aio=yes
+cvs update tools/debugocfs/fsck.ocfs
+make ul64gb_rpm
+make clean
+./autogen.sh --with-kernel=/usr/src/linux-2.4.19-4GB-SMP --enable-aio=yes
+cvs update tools/debugocfs/fsck.ocfs
+make ul4gbsmp_rpm
+make clean
+./autogen.sh --with-kernel=/usr/src/linux-2.4.19-4GB --enable-aio=yes
+cvs update tools/debugocfs/fsck.ocfs
+make ul4gb_rpm
Property changes on: branches/ocfs-1.0/makeallsuse
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfs.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfs.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfs.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -30,9 +30,13 @@
/* XXX Hack to avoid warning */
struct mem_dqinfo;
extern inline void mark_info_dirty(struct mem_dqinfo *info);
-#ifndef x86_64
+#ifdef __i386__
extern inline void prefetch(const void *x);
#endif
+#ifdef __ia64__
+extern inline void prefetch(const void *x);
+extern inline void prefetchw(const void *x);
+#endif
/*
** System header files
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfscom.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfscom.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfscom.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -29,6 +29,17 @@
#define OCFS_POINTER_SIZE (sizeof(void *))
+#ifdef __LP64__
+#define OCFS_GCC_ATTR_PACKED __attribute__ ((packed))
+#define OCFS_GCC_ATTR_ALIGNED __attribute__ ((aligned(4)))
+#define OCFS_GCC_ATTR_PACKALGN __attribute__ ((aligned(4), packed))
+#endif
+#ifdef __i386__
+#define OCFS_GCC_ATTR_PACKED
+#define OCFS_GCC_ATTR_ALIGNED
+#define OCFS_GCC_ATTR_PACKALGN
+#endif
+
typedef struct _ocfs_alloc_bm
{
void *buf;
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsconst.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsconst.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsconst.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -235,6 +235,7 @@
#define OCFS_PUBLISH_SET 1
#define OCFS_NM_HEARTBEAT_TIME 500 /* in ms */
+#define OCFS_HEARTBEAT_INIT 10 /* number of NM iterations to stabilize the publish map */
#ifndef O_DIRECT
#define O_DIRECT 040000
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsdef.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsdef.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsdef.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -27,15 +27,6 @@
#ifndef _OCFSDEF_H_
#define _OCFSDEF_H_
-#define UPDATE_OIN(a) \
-do { \
- int __status; \
- (a)->needs_verification = true; \
- __status = ocfs_verify_update_oin((a)->osb, (a)); \
- if (__status < 0) \
- LOG_ERROR_STATUS (__status); \
-} while (0)
-
#define OIN_NEEDS_VERIFICATION(a) ((a)->needs_verification)
#define OIN_UPDATED(a) ((a)->needs_verification = false)
@@ -114,6 +105,17 @@
} \
} while (0)
+#define ocfs_task_interruptible(_o) ((_o)->dlm_task != current && signal_pending(current))
+
+#define ocfs_trans_in_progress(_o) \
+do { \
+ int _i = 0; \
+ while (((_o)->trans_in_progress) && (_i < 10)) {\
+ ocfs_sleep (100); \
+ _i++; \
+ } \
+} while (0)
+
struct _ocfs_file;
struct _ocfs_inode;
struct _ocfs_super;
@@ -341,6 +343,7 @@
__u8 *log_prealloc;
struct semaphore publish_lock; /* protects r/w to publish sector */
atomic_t node_req_vote; /* set when node's vote req pending */
+ struct semaphore trans_lock; /* serializes transactions */
};
enum {
@@ -399,15 +402,23 @@
};
#if defined(OCFS_LINUX_MEM_DEBUG)
-# define ocfs_malloc(Size) ({ \
- void *m = ocfs_linux_dbg_alloc(Size, __FILE__, __LINE__); \
- printk("ocfs_malloc(%s:%d) = %p\n", __FILE__, __LINE__, m);\
- m; \
- })
-# define ocfs_free(x) do { \
- printk("ocfs_free(%s:%d) = %p\n", __FILE__, __LINE__, x);\
- ocfs_linux_dbg_free(x); \
- } while (0)
+# define ocfs_malloc(_s) \
+({ \
+ void *m = ocfs_linux_dbg_alloc(_s, __FILE__, __LINE__); \
+ if (debug_level & OCFS_DEBUG_LEVEL_MALLOC) \
+ printk("malloc(%s,%d) = %p\n", __FILE__, \
+ __LINE__, m); \
+ m; \
+})
+
+# define ocfs_free(x)\
+do { \
+ if (debug_level & OCFS_DEBUG_LEVEL_MALLOC) \
+ printk("free(%s,%d) = %p\n", __FILE__, \
+ __LINE__, x); \
+ ocfs_linux_dbg_free(x); \
+} while (0)
+
#elif !defined(OCFS_LINUX_MEM_DEBUG)
# define ocfs_malloc(Size) kmalloc((size_t)(Size), GFP_KERNEL)
# define ocfs_free kfree
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsdisk.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsdisk.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsdisk.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -51,6 +51,7 @@
/* last seq num used in comm voting */
__u64 comm_seq_num; // NUMBER RANGE(0,ULONG_LONG_MAX)
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_publish;
typedef struct _ocfs_vote
@@ -60,6 +61,7 @@
__u64 dir_ent; // NUMBER RANGE(0,ULONG_LONG_MAX)
__u8 open_handle; // BOOL
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_vote;
typedef struct _ocfs_file_entry
@@ -88,6 +90,9 @@
__u32 gid; // GID
__u16 dev_major; // NUMBER RANGE(0,65535)
__u16 dev_minor; // NUMBER RANGE(0,65535)
+ /* 32-bit: sizeof(fe) = 484 bytes */
+ /* 64-bit: sizeof(fe) = 488 bytes */
+ /* Need to account for that fact when the struct is extended. */
}
ocfs_file_entry;
@@ -99,6 +104,7 @@
__u8 name_len;
__u8 name[1];
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_index_node;
typedef struct _ocfs_index_hdr
@@ -108,7 +114,7 @@
__s64 up_tree_ptr; /* Pointer to parent of this dnode */
__u64 node_disk_off;
__u8 state; /* In recovery, needs recovery etc */
- __u64 down_ptr;
+ __u64 down_ptr OCFS_GCC_ATTR_ALIGNED;
__u8 num_ents;; /* Number of extents in this Node */
__u8 depth; /* Depth of this Node from root of the btree */
__u8 num_ent_used; /* Num of entries in the dir blk used up. */
@@ -118,6 +124,7 @@
__u8 reserved[161];
__u8 file_ent[1]; /* 63 entries here with 32K DIR_NODE size */
}
+OCFS_GCC_ATTR_PACKED
ocfs_index_hdr;
/* not sizeof-safe across platforms */
@@ -146,6 +153,7 @@
__u8 reserved[127]; // UNUSED
__u8 file_ent[1]; // UNUSED
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_dir_node;
typedef struct _ocfs_vol_node_map
@@ -219,5 +227,6 @@
ocfs_disk_lock disk_lock;
__u32 used_bits;
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_bitmap_lock;
#endif /*_OCFSDISK_H_ */
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsdlm.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsdlm.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsdlm.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -38,7 +38,9 @@
__u32 flags;
__u64 lock_seq_num;
__u8 open_handle;
-} ocfs_dlm_msg_hdr;
+}
+OCFS_GCC_ATTR_PACKALGN
+ocfs_dlm_msg_hdr;
typedef ocfs_dlm_msg_hdr ocfs_dlm_req_master;
typedef ocfs_dlm_msg_hdr ocfs_dlm_disk_vote_req;
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfserr.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfserr.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfserr.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,19 +1,3 @@
-/****************************************************************************
- ** Oracle Cluster File System
- **
- ** File: ocfserr.h
- **
- ** Module: Oracle Cluster File System Driver
- **
- ** Description:
- **
- ** Author: Neeraj Goyal, Suchit Kaura
- **
- ** MODIFIED MM/DD/YY
- ** ======== ========
- ** smushran 08-21-01 - Portable
- ** skaura 04-04-00 - Created
-*/
#ifndef _OCFSERR_H_
#define _OCFSERR_H_
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsgendlm.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsgendlm.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsgendlm.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -33,8 +33,10 @@
__u64 log_disk_off;
__u64 actual_disk_off;
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_offset_map;
+#ifndef USERSPACE_TOOL
int ocfs_insert_cache_link (ocfs_super * osb, ocfs_lock_res * lockres);
int ocfs_update_lock_state (ocfs_super * osb, ocfs_lock_res * lockres,
@@ -129,4 +131,5 @@
int ocfs_break_cache_lock (ocfs_super * osb, ocfs_lock_res * lockres,
ocfs_file_entry *fe);
+#endif /* USERSPACE_TOOL */
#endif /* _OCFSGENDLM_H_ */
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsgenmisc.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsgenmisc.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsgenmisc.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -109,30 +109,36 @@
} while (0)
#ifdef OCFS_DBG_LOCKRES
-#define ocfs_get_lockres(_r) \
-do { \
- if (_r) { \
- printk("(%d) get: 0x%08x, %d, %s, %d\n", \
- ocfs_getpid(), (_r), \
- atomic_read(&((_r)->lr_ref_cnt)) + 1, \
- __FUNCTION__, __LINE__); \
- _ocfs_get_lockres(_r); \
- } else \
- printk("(%d) get: null, -1, %s, %d\n", \
- ocfs_getpid(), __FUNCTION__, __LINE__); \
+#define ocfs_get_lockres(_r) \
+do { \
+ if (_r) { \
+ if (debug_level & OCFS_DEBUG_LEVEL_LOCKRES) \
+ printk("(%d) get: 0x%08x, %d, %s, %d\n", \
+ ocfs_getpid(), (_r), \
+ atomic_read(&((_r)->lr_ref_cnt)) + 1, \
+ __FUNCTION__, __LINE__); \
+ _ocfs_get_lockres(_r); \
+ } else { \
+ if (debug_level & OCFS_DEBUG_LEVEL_LOCKRES) \
+ printk("(%d) get: null, -1, %s, %d\n", \
+ ocfs_getpid(), __FUNCTION__, __LINE__); \
+ } \
} while (0)
-#define ocfs_put_lockres(_r) \
-do { \
- if (_r) { \
- printk("(%d) put: 0x%08x, %d, %s, %d\n", \
- ocfs_getpid(), (_r), \
- atomic_read(&((_r)->lr_ref_cnt)) - 1, \
- __FUNCTION__, __LINE__); \
- _ocfs_put_lockres(_r); \
- } else \
- printk("(%d) put: null, -1, %s, %d\n", \
- ocfs_getpid(), __FUNCTION__, __LINE__); \
+#define ocfs_put_lockres(_r) \
+do { \
+ if (_r) { \
+ if (debug_level & OCFS_DEBUG_LEVEL_LOCKRES) \
+ printk("(%d) put: 0x%08x, %d, %s, %d\n", \
+ ocfs_getpid(), (_r), \
+ atomic_read(&((_r)->lr_ref_cnt)) - 1, \
+ __FUNCTION__, __LINE__); \
+ _ocfs_put_lockres(_r); \
+ } else { \
+ if (debug_level & OCFS_DEBUG_LEVEL_LOCKRES) \
+ printk("(%d) put: null, -1, %s, %d\n", \
+ ocfs_getpid(), __FUNCTION__, __LINE__); \
+ } \
} while (0)
#else /* !OCFS_DBG_LOCKRES */
#define ocfs_get_lockres(_r) _ocfs_get_lockres(_r)
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfstrace.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfstrace.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfstrace.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -46,6 +46,9 @@
#define OCFS_DEBUG_LEVEL_TIMING 0x00000100
#define OCFS_DEBUG_LEVEL_STACK 0x00000200
+#define OCFS_DEBUG_LEVEL_LOCKRES 0x00001000 /* get/put lockres */
+#define OCFS_DEBUG_LEVEL_MALLOC 0x00002000 /* malloc/free lockres */
+
/* Tracing Contexts */
#define OCFS_DEBUG_CONTEXT_INIT 0x00000001 /* ocfsgeninit.c,ocfsmain.c */
#define OCFS_DEBUG_CONTEXT_MEM 0x00000002 /* ocfs_memcheck() in ocfsmain.c */
@@ -80,7 +83,10 @@
#define OCFS_DEBUG_CONTEXT_IOSUP 0x40000000 /* ocfsiosup.c */
-#define GET_STACK(s) \
+#ifdef __ia64__
+# define GET_STACK(s)
+#else
+# define GET_STACK(s) \
IF_LEVEL(OCFS_DEBUG_LEVEL_STACK) { \
__s32 esp; \
__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : \
@@ -88,14 +94,19 @@
esp -= sizeof(struct task_struct); \
sprintf((s), "[%ld] ", esp); \
}
+#endif
/* privately used macros */
-# define IF_LEVEL(level) \
+#define IF_LEVEL(level) \
if ((debug_context & OCFS_DEBUG_CONTEXT) && (debug_level & level) && \
ocfs_getpid()!=debug_exclude)
+#ifdef __ia64__
# define GET_TIMING(s, hi, lo) \
+ do { _HI = _LO = 0; } while (0)
+#else
+# define GET_TIMING(s, hi, lo) \
do { \
IF_LEVEL(OCFS_DEBUG_LEVEL_TIMING) { \
__u32 _lo, _hi; \
@@ -112,6 +123,7 @@
} \
} \
} while (0)
+#endif
/* IF macro */
#define IF_TRACE(func) \
@@ -125,12 +137,12 @@
#if !defined(TRACE)
# define LOG_ENTRY()
# define LOG_EXIT()
-# define LOG_EXIT_STATUS(val)
-# define LOG_EXIT_LONG(val)
-# define LOG_EXIT_ULONG(val)
-# define LOG_EXIT_PTR(val)
+# define LOG_EXIT_STATUS(val) (val)
+# define LOG_EXIT_LONG(val) (val)
+# define LOG_EXIT_ULONG(val) (val)
+# define LOG_EXIT_PTR(val) (val)
# define LOG_TRACE_STR(str)
-# define LOG_TRACE_STATUS(val)
+# define LOG_TRACE_STATUS(val) (val)
# define LOG_ENTRY_ARGS(fmt, arg...)
# define LOG_EXIT_ARGS(fmt, arg...)
# define LOG_TRACE_ARGS(fmt, arg...)
@@ -188,7 +200,7 @@
#define LOG_EXIT_STATUS(val) LOG_EXIT_ARGS("%d ", val)
#define LOG_EXIT_LONG(val) LOG_EXIT_ARGS("%d ", val)
#define LOG_EXIT_ULONG(val) LOG_EXIT_ARGS("%u ", val)
-#define LOG_EXIT_PTR(val) LOG_EXIT_ARGS("0x%08x ", val)
+#define LOG_EXIT_PTR(val) LOG_EXIT_ARGS("0x%p ", val)
/* TRACE macros */
@@ -199,8 +211,8 @@
#define LOG_TRACE_ARGS(fmt, arg...) \
do { \
IF_LEVEL(OCFS_DEBUG_LEVEL_TRACE) { \
- printk("(%d) TRACE: %s() ", ocfs_getpid (), \
- __FUNCTION__); \
+ printk("(%d) TRACE: %s(%d) ", ocfs_getpid (), \
+ __FUNCTION__, __LINE__); \
printk(fmt, ## arg); \
} \
} while (0)
Modified: branches/ocfs-1.0/ocfs2/Common/inc/ocfsvol.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/inc/ocfsvol.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/inc/ocfsvol.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -182,6 +182,7 @@
__u32 last_node;
__u64 cfg_seq_num;
}
+OCFS_GCC_ATTR_PACKALGN
ocfs_node_config_hdr;
/*
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgenalloc.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgenalloc.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgenalloc.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -1678,7 +1678,8 @@
}
} /* For loop */
- LOG_TRACE_ARGS("Writing that data extent back out to disk now (%u,%u)\n", HI(AllocExtent->this_ext), LO(AllocExtent->this_ext));+ /* Either way, we need to write this back out*/
+ LOG_TRACE_ARGS("Writing that data extent back out to disk now (%u,%u)\n", HI(AllocExtent->this_ext), LO(AllocExtent->this_ext));
+ /* Either way, we need to write this back out*/
status = ocfs_write_sector (osb, AllocExtent, AllocExtent->this_ext);
if (status < 0) {
LOG_ERROR_STATUS(status);
@@ -2059,8 +2060,20 @@
goto READ_ENTRY;
}
- status = ocfs_extent_map_load (osb, &(oin->map), Buffer, Vbo, ByteCount,
- &Runs);
+ /* special case: just one byte - also happens to be the *only*
+ * way in which this func is currently called */
+ if (ByteCount == 1) {
+ status = -EFAIL;
+ /* return the blocknum directly, no need to alloc ioruns */
+ if (ocfs_lookup_extent_map_entry (osb, &oin->map, Vbo, Lbo,
+ &length, &Runs)) {
+ status = 0;
+ goto no_iorun_exit;
+ }
+ } else {
+ status = ocfs_extent_map_load (osb, &(oin->map), Buffer, Vbo,
+ ByteCount, &Runs);
+ }
if (status >= 0) {
/* If status is success, we found the needed extent map */
goto finally;
@@ -2160,20 +2173,30 @@
}
}
- status =
- ocfs_extent_map_load (osb, &oin->map, Buffer, Vbo, ByteCount, &Runs);
+ if (ByteCount == 1) {
+ status = -EFAIL;
+ if (ocfs_lookup_extent_map_entry (osb, &oin->map, Vbo, Lbo,
+ &length, &Runs)) {
+ status = 0;
+ }
+ goto no_iorun_exit;
+ } else {
+ status = ocfs_extent_map_load (osb, &(oin->map), Buffer, Vbo,
+ ByteCount, &Runs);
+ }
+
if (status < 0) {
LOG_ERROR_STATUS (status);
- goto finally;
}
- finally:
+finally:
if (status >= 0) {
IoRuns = (ocfs_io_runs *) (*Buffer);
*(NumIndex) = Runs;
*(Lbo) = IoRuns[0].disk_off;
}
+no_iorun_exit:
/* Should send a null for IoRuns in case of onl 1 extent */
LOG_TRACE_ARGS ("Num of Runs is: %d\n", Runs);
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgencreate.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgencreate.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgencreate.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -133,6 +133,7 @@
switch (fe->attribs & (~OCFS_ATTRIB_FILE_CDSL)) {
case OCFS_ATTRIB_DIRECTORY:
inode->i_size = OCFS_DEFAULT_DIR_NODE_SIZE;
+ inode->i_blocks = (inode->i_size + 512) >> 9;
inode->i_mode |= S_IFDIR;
break;
case OCFS_ATTRIB_SYMLINK:
@@ -267,7 +268,8 @@
OCFS_DLM_EXCLUSIVE_LOCK, 0, &pLockResource,
fe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -363,10 +365,10 @@
}
#endif
- LOG_TRACE_ARGS ("byte offset=%u\n", ByteOffset);
-
ocfs_set_bits (&osb->cluster_bitmap, ByteOffset, ClusterCount);
+ LOG_TRACE_ARGS("gb_s: bit=%d, len=%d\n", ByteOffset, ClusterCount);
+
startOffset = osb->vol_layout.bitmap_off;
status =
@@ -456,7 +458,8 @@
OCFS_OIN_DIRECTORY | OCFS_OIN_IN_USE, NULL,
fe->this_sector, lockId);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
oin->dir_disk_off = fe->extents[0].disk_off;
@@ -464,7 +467,8 @@
status = ocfs_initialize_oin (oin, osb, OCFS_OIN_IN_USE, NULL,
fe->this_sector, fe->this_sector);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -554,6 +558,9 @@
*new_oin = oin;
leave:
+ if (!*new_oin)
+ ocfs_release_oin (oin, true);
+
ocfs_safefree (buffer);
LOG_EXIT_STATUS (status);
@@ -580,7 +587,7 @@
bool icky_vmalloc = false;
bool lock_acq = false;
- LOG_ENTRY_ARGS ("(osb=0x%08x, poff=%u.%u, fe=0x%08x)\n",
+ LOG_ENTRY_ARGS ("(osb=0x%p, poff=%u.%u, fe=0x%p)\n",
osb, parent_off, fe);
lockId = parent_off;
@@ -595,8 +602,8 @@
status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_SHARED_LOCK, FLAG_DIR,
&lockres, dirfe);
if (status < 0) {
- /* Volume should be disabled in this case */
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -833,7 +840,8 @@
(__u32) parentLockFlags, &pParentLockResource,
NULL);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -863,7 +871,8 @@
status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_EXCLUSIVE_LOCK,
lockFlags, &pLockResource, lockfe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -976,7 +985,7 @@
__u64 lockId = 0;
__u32 log_node_num = OCFS_INVALID_NODE_NUM;
- LOG_ENTRY_ARGS ("(osb=0x%08x, poff=%u.%u, fl=%u, foff=%u.%u)\n",
+ LOG_ENTRY_ARGS ("(osb=0x%p, poff=%u.%u, fl=%u, foff=%u.%u)\n",
osb, HILO(parent_off), flags, HILO(file_off));
status = ocfs_get_file_entry (osb, &fe, file_off);
@@ -1001,7 +1010,8 @@
status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_EXCLUSIVE_LOCK,
lockFlags, &pLockResource, (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1165,16 +1175,14 @@
bCacheLock = true;
}
- if (bCacheLock)
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_ENABLE_CACHE_LOCK, lockFlags,
- &pLockResource, (ocfs_file_entry *) pLockNode);
- else
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_EXCLUSIVE_LOCK, lockFlags,
- &pLockResource, (ocfs_file_entry *) pLockNode);
+ status = ocfs_acquire_lock (osb, lockId,
+ (bCacheLock ? OCFS_DLM_ENABLE_CACHE_LOCK :
+ OCFS_DLM_EXCLUSIVE_LOCK),
+ lockFlags, &pLockResource,
+ (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1214,6 +1222,11 @@
actualLength =
(__u64) (numClustersAlloc * osb->vol_layout.cluster_size);
+ LOG_TRACE_ARGS ("ocfs: extend %s fe=%u.%u (%u.%u + %u.%u = %u.%u)\n",
+ fileEntry->filename, HILO(fileEntry->this_sector),
+ HILO(fileEntry->alloc_size), HILO(actualLength),
+ HILO(fileEntry->alloc_size + actualLength));
+
/* note: ok if oin is null here, not used in ocfs_allocate_extent */
status = ocfs_allocate_extent (osb, oin, fileEntry,
actualDiskOffset, actualLength);
@@ -1331,16 +1344,14 @@
bFileLockAcquired = true;
pLockNode = (ocfs_dir_node *)fileEntry;
- if (bCacheLock)
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_ENABLE_CACHE_LOCK, lockFlags,
- &pLockResource, (ocfs_file_entry *) pLockNode);
- else
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_EXCLUSIVE_LOCK, lockFlags,
- &pLockResource, (ocfs_file_entry *) pLockNode);
+ status = ocfs_acquire_lock (osb, lockId,
+ (bCacheLock ? OCFS_DLM_ENABLE_CACHE_LOCK :
+ OCFS_DLM_EXCLUSIVE_LOCK),
+ lockFlags, &pLockResource,
+ (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1351,6 +1362,8 @@
DISK_LOCK_CURRENT_MASTER (fileEntry) = osb->node_num;
}
+ fileEntry->modify_time = CURRENT_TIME;
+
DISK_LOCK_SEQNUM (fileEntry) = changeSeqNum;
if (attr->ia_valid & ATTR_SIZE)
fileEntry->file_size = attr->ia_size;
@@ -1360,6 +1373,10 @@
fileEntry->gid = attr->ia_gid;
if (attr->ia_valid & ATTR_MODE)
fileEntry->prot_bits = attr->ia_mode & 0007777;
+ if (attr->ia_valid & ATTR_CTIME)
+ fileEntry->create_time = attr->ia_ctime;
+ if (attr->ia_valid & ATTR_MTIME)
+ fileEntry->modify_time = attr->ia_mtime;
/* Set the valid bit here */
SET_VALID_BIT (fileEntry->sync_flags);
@@ -1367,8 +1384,6 @@
dirOffset = fileEntry->this_sector;
- fileEntry->modify_time = CURRENT_TIME;
-
size = (__u32) OCFS_SECTOR_ALIGN (sizeof (ocfs_file_entry));
status =
ocfs_write_file_entry (osb, (ocfs_file_entry *) fileEntry, dirOffset);
@@ -1432,7 +1447,8 @@
lockFlags, &pLockResource,
(ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1590,7 +1606,8 @@
lockFlags, &pLockResource,
(ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1680,7 +1697,7 @@
__u64 changeSeqNum = 0;
__u64 t;
- LOG_ENTRY_ARGS ("(osb=0x%08x, poff=%u.%u, fe=0x%08x)\n",
+ LOG_ENTRY_ARGS ("(osb=0x%p, poff=%u.%u, fe=0x%p)\n",
osb, HILO(parent_off), fe);
ocfs_start_trans (osb);
@@ -1691,7 +1708,7 @@
status = ocfs_extend_file (osb, parent_off, oin, file_size,
file_off);
if (status < 0) {
- if (status != -ENOSPC)
+ if (status != -ENOSPC && status != -EINTR)
LOG_ERROR_STATUS (status);
goto leave;
}
@@ -1700,6 +1717,8 @@
case FLAG_FILE_DELETE:
status = ocfs_del_file (osb, parent_off, 0, *file_off);
if (status < 0) {
+ if (status != -EINTR && status != -ENOTEMPTY)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1742,7 +1761,8 @@
if (status >= 0)
*file_off = newfe->this_sector;
else {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1791,7 +1811,8 @@
if (status >= 0)
*file_off = newfe->this_sector;
else {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1799,7 +1820,8 @@
case FLAG_FILE_DELETE_CDSL:
status = ocfs_delete_cdsl (osb, parent_off, fe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1807,7 +1829,8 @@
case FLAG_FILE_CREATE_CDSL:
status = ocfs_create_cdsl (osb, parent_off, fe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1815,7 +1838,8 @@
case FLAG_FILE_CHANGE_TO_CDSL:
status = ocfs_change_to_cdsl (osb, parent_off, fe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1823,7 +1847,8 @@
case FLAG_FILE_TRUNCATE:
status = ocfs_truncate_file (osb, *file_off, file_size, oin);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1832,7 +1857,8 @@
status = ocfs_change_file_size (osb, parent_off, oin,
file_size, file_off, attr);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
break;
@@ -1972,11 +1998,15 @@
status = ocfs_create_modify_file (osb, parent_off, NULL,
NULL, tempSize, &fileEntry,
FLAG_FILE_CHANGE_TO_CDSL, fe, NULL);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
} else if ((cdsl->operation & OCFS_CDSL_DELETE)) {
status = ocfs_create_modify_file (osb, parent_off, NULL,
NULL, tempSize, &fileEntry,
FLAG_FILE_DELETE_CDSL, fe, NULL);
+ if (status == -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
} else {
status = -EINVAL;
@@ -2026,6 +2056,8 @@
tempSize, &fileEntry, FLAG_FILE_CREATE_CDSL,
fe, NULL);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2270,7 +2302,8 @@
} else {
status = ocfs_break_cache_lock (osb, pLockRes);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2344,7 +2377,8 @@
parentLockFlags, &pParentLockResource,
(ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2356,7 +2390,8 @@
status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_EXCLUSIVE_LOCK,
lockFlags, &pLockResource, newfe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2462,18 +2497,14 @@
lockFlags = FLAG_FILE_CHANGE_TO_CDSL;
pLockNode = (ocfs_dir_node *) new_fe;
- if (bCacheLock) {
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_ENABLE_CACHE_LOCK, lockFlags,
- &lockres, (ocfs_file_entry *) pLockNode);
- } else {
- status = ocfs_acquire_lock (osb, lockId,
- OCFS_DLM_EXCLUSIVE_LOCK, lockFlags,
- &lockres, (ocfs_file_entry *) pLockNode);
- }
-
+ status = ocfs_acquire_lock (osb, lockId,
+ (bCacheLock ? OCFS_DLM_ENABLE_CACHE_LOCK :
+ OCFS_DLM_EXCLUSIVE_LOCK),
+ lockFlags, &lockres,
+ (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2613,7 +2644,8 @@
status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_EXCLUSIVE_LOCK,
lockFlags, &pLockResource, (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
bAcquiredLock = true;
@@ -2783,15 +2815,22 @@
}
status = ocfs_acquire_lock (osb, lockId,
- bCacheLock ? OCFS_DLM_ENABLE_CACHE_LOCK : OCFS_DLM_EXCLUSIVE_LOCK,
- lockFlags, &pLockResource, (ocfs_file_entry *) pLockNode);
+ (bCacheLock ? OCFS_DLM_ENABLE_CACHE_LOCK :
+ OCFS_DLM_EXCLUSIVE_LOCK),
+ lockFlags, &pLockResource,
+ (ocfs_file_entry *) pLockNode);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto leave;
}
bAcquiredLock = true;
+ LOG_TRACE_ARGS ("ocfs: truncate %s fe=%u.%u (%u.%u - %u.%u = %u.%u)\n",
+ fe->filename, HILO(fe->this_sector), HILO(fe->alloc_size),
+ HILO(fe->alloc_size - new_alloc_size), HILO(new_alloc_size));
+
fe->file_size = file_size;
fe->alloc_size = new_alloc_size;
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgendirnode.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgendirnode.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgendirnode.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -459,6 +459,9 @@
ocfs_clear_bits (pTempBitMap, (__u32) foundBit,
(__u32) FreeLog->free_bitmap[i].length);
+
+ LOG_TRACE_ARGS("gb_c: bit=%d, len=%u, i=%d\n", foundBit,
+ (__u32)FreeLog->free_bitmap[i].length, i);
}
/* Write a cleanup log here */
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgendlm.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgendlm.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgendlm.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -64,25 +64,25 @@
__u64 lockseqno = 0;
unsigned long jif;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n", osb, lockres, flags);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u)\n", osb, lockres, flags);
votemap = (1 << lockres->master_node_num);
- jif = jiffies;
if (comm_voting && !*disk_vote) {
LOG_TRACE_STR ("Network vote");
+ jif = jiffies;
status = ocfs_send_dlm_request_msg (osb, lockres->sector_num,
lockres->lock_type, flags, lockres, votemap);
if (status >= 0) {
-// if (flags & FLAG_CHANGE_MASTER)
-// lockres->master_node_num = osb->node_num;
- goto vote_success;
+ status = lockres->vote_status;
+ if (status >= 0)
+ goto vote_success;
+ else
+ goto finito;
} else if (status == -ETIMEDOUT) {
LOG_TRACE_STR ("Network voting timed out");
- lockres->vote_state = 0;
}
- else
- LOG_ERROR_STATUS (status);
+ lockres->vote_state = 0;
}
LOG_TRACE_STR ("Disk vote");
@@ -109,12 +109,9 @@
jif = jiffies - jif;
LOG_TRACE_ARGS ("Lock time: %u\n", jif);
- /* Change the lock id on the disk and on the resource */
if (flags & FLAG_CHANGE_MASTER)
lockres->master_node_num = osb->node_num;
- /* Lock state should transition from no lock */
-
finito:
if (*disk_vote) {
tmpstat = ocfs_reset_voting (osb, lockres->sector_num,
@@ -148,10 +145,10 @@
__u32 wait;
bool publish_flag = false;
- LOG_ENTRY_ARGS ("(osb=0x%08x, id=%u.%u, ty=%u, fl=%u, vm=0x%08x)\n", osb,
+ LOG_ENTRY_ARGS ("(osb=0x%p, id=%u.%u, ty=%u, fl=%u, vm=0x%08x)\n", osb,
HI(lock_id), LO(lock_id), lock_type, flags, LO(vote_map));
- LOG_TRACE_ARGS ("osb=0x%08x, id=%u.%u, ty=%u, fl=%u, vm=0x%08x\n",
+ LOG_TRACE_ARGS ("osb=0x%p, id=%u.%u, ty=%u, fl=%u, vm=0x%08x\n",
osb, HI(lock_id), LO(lock_id), lock_type, flags, LO(vote_map));
pubmap = osb->publ_map;
@@ -314,7 +311,7 @@
ocfs_file_entry *fe = NULL;
__u32 length = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u, 0x%08x, %u)\n", osb,
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u, 0x%p, %u)\n", osb,
HI (offset), LO (offset), time_to_wait,
lockres, lock_type);
@@ -359,7 +356,8 @@
lockres->master_node_num = DISK_LOCK_CURRENT_MASTER (fe);
status = ocfs_break_cache_lock (osb, lockres, fe);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto finally;
}
DISK_LOCK_FILE_LOCK (fe) = lockres->lock_type;
@@ -479,12 +477,9 @@
ocfs_publish *pubsect = NULL;
__u64 offset = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u)\n", osb, HI (lock_id),
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u)\n", osb, HI (lock_id),
LO (lock_id), lock_type);
- LOG_TRACE_ARGS ("0x%08x, %u.%u, %u\n", osb, HI (lock_id),
- LO (lock_id), lock_type);
-
/* take lock to prevent publish overwrites by vote_req and nm thread */
down (&(osb->publish_lock));
@@ -533,14 +528,10 @@
__u64 gotvotemap = 0;
__u64 fileopenmap = 0;
- LOG_ENTRY_ARGS ("(osb=0x%08x, id=%u.%u, ty=%u, fl=%u, vm=0x%08x, "
+ LOG_ENTRY_ARGS ("(osb=0x%p, id=%u.%u, ty=%u, fl=%u, vm=0x%08x, "
"sq:%u.%u)\n", osb, HI (lock_id), LO (lock_id), lock_type,
flags, LO (vote_map), HI(lock_seq_num), LO(lock_seq_num));
- LOG_TRACE_ARGS ("osb=0x%08x, id=%u.%u, ty=%u, fl=%u, vm=0x%08x, "
- "sq=%u.%u\n", osb, HI (lock_id), LO (lock_id), lock_type,
- flags, LO (vote_map), HI(lock_seq_num), LO(lock_seq_num));
-
while (time_to_wait > timewaited) {
ocfs_sleep (WAIT_FOR_VOTE_INCREMENT);
@@ -711,7 +702,7 @@
__u32 msg_len;
ocfs_dlm_msg_hdr *req;
- LOG_ENTRY_ARGS ("(osb=0x%08x, id:%u.%u, ty=%u, fl=%u, vm=0x%08x)\n", osb,
+ LOG_ENTRY_ARGS ("(osb=0x%p, id:%u.%u, ty=%u, fl=%u, vm=0x%08x)\n", osb,
HI(lock_id), LO(lock_id), lock_type, flags, LO(vote_map));
msg_len = sizeof (ocfs_dlm_msg) - 1 + sizeof (ocfs_dlm_req_master);
@@ -742,6 +733,9 @@
req->flags = flags;
req->lock_seq_num = lockres->last_upd_seq_num;
+ LOG_TRACE_ARGS ("ocfs: vote request lockid=%u.%u, seq=%u.%u, map=0x%08x\n",
+ HILO(req->lock_id), HILO(req->lock_seq_num), LO(vote_map));
+
ocfs_send_bcast (osb, vote_map, dlm_msg);
status = ocfs_wait (lockres->voted_event,
atomic_read (&lockres->voted_event_woken), 1000);
@@ -877,20 +871,21 @@
}
#endif
- jif = jiffies;
-
if (comm_voting && !*disk_vote) {
LOG_TRACE_STR ("Network vote");
+ jif = jiffies;
status = ocfs_send_dlm_request_msg (osb, lock_id, lock_type,
flags, lockres, vote_map);
if (status >= 0) {
- goto vote_success;
+ status = lockres->vote_status;
+ if (status >= 0)
+ goto vote_success;
+ else
+ goto bail;
} else if (status == -ETIMEDOUT) {
LOG_TRACE_STR ("Network voting timed out");
- lockres->vote_state = 0;
}
- else
- LOG_ERROR_STATUS (status);
+ lockres->vote_state = 0;
}
LOG_TRACE_STR ("Disk vote");
@@ -954,7 +949,7 @@
int status = 0;
int cnt = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %d)\n", lockres, timeout);
+ LOG_ENTRY_ARGS ("(0x%p, %d)\n", lockres, timeout);
mypid = ocfs_getpid ();
@@ -1006,10 +1001,10 @@
*/
void ocfs_release_lockres (ocfs_lock_res * lockres)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", lockres);
+ LOG_ENTRY_ARGS ("(0x%p)\n", lockres);
if (lockres->in_use == 0) {
- LOG_TRACE_ARGS("Releasing lockres with inuse 0: 0x%08x\n",
+ LOG_TRACE_ARGS("Releasing lockres with inuse 0: 0x%p\n",
lockres);
lockres->thread_id = 0;
lockres->in_use = 0;
@@ -1119,8 +1114,17 @@
if (status != -EAGAIN)
LOG_ERROR_STATUS (status);
ocfs_release_lockres (lockres);
- if (status == -EAGAIN)
+ if (status == -EAGAIN) {
+ ocfs_sleep (500);
+ if (ocfs_task_interruptible (osb)) {
+ LOG_TRACE_ARGS("interrupted... "
+ "lockid=%u.%u\n",
+ HILO(lockres->sector_num));
+ status = -EINTR;
+ goto bail;
+ }
continue;
+ }
goto bail;
}
ocfs_release_lockres (lockres);
@@ -1138,7 +1142,7 @@
*/
void ocfs_init_lockres (ocfs_super * osb, ocfs_lock_res * lockres, __u64 lock_id)
{
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u.%u)\n", osb, lockres,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u.%u)\n", osb, lockres,
HI (lock_id), LO (lock_id));
lockres->signature = 0x55AA;
@@ -1181,7 +1185,7 @@
ocfs_lock_res *tmp_lockres = NULL;
bool is_dir = false;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u.%u, %u)\n", osb, oin,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u.%u, %u)\n", osb, oin,
HI (lock_id), LO (lock_id), flags);
is_dir = (flags & OCFS_OIN_DIRECTORY) ? true : false;
@@ -1209,7 +1213,8 @@
status = ocfs_wait_for_lock_release (osb, lock_id, 30000, lockres,
(is_dir ? OCFS_DLM_EXCLUSIVE_LOCK : OCFS_DLM_NO_LOCK));
if (status < 0) {
- LOG_ERROR_STR ("Lock owner is alive and taking too much time");
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto bail;
}
} else {
@@ -1227,7 +1232,8 @@
status = ocfs_wait_for_lock_release (osb, lock_id, 30000, lockres,
(is_dir ? OCFS_DLM_EXCLUSIVE_LOCK : OCFS_DLM_NO_LOCK));
if (status < 0) {
- LOG_ERROR_STR ("Lock owner is alive and taking too much time");
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto bail;
}
@@ -1245,7 +1251,8 @@
status = ocfs_wait_for_lock_release (osb, lock_id, 30000, lockres,
(is_dir ? OCFS_DLM_EXCLUSIVE_LOCK : OCFS_DLM_NO_LOCK));
if (status < 0) {
- LOG_ERROR_STR ("Lock owner is alive and taking too much time");
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto bail;
}
} else {
@@ -1281,7 +1288,8 @@
status = ocfs_update_master_on_open (osb, lockres);
if (status < 0) {
ocfs_release_lockres (lockres);
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto bail;
}
}
@@ -1320,13 +1328,19 @@
goto finally;
} else if (status == -EAGAIN) {
ocfs_release_lockres (lockres);
+ ocfs_sleep (500);
+ if (ocfs_task_interruptible (osb)) {
+ LOG_TRACE_ARGS("interrupted... lockid=%u.%u\n",
+ HILO(lock_id));
+ status = -EINTR;
+ goto finally;
+ }
status = ocfs_disk_update_resource (osb, lockres, fe, 0);
if (status < 0) {
LOG_ERROR_STATUS (status);
osb->vol_state = VOLUME_DISABLED;
goto finally;
}
- ocfs_sleep (200);
continue;
} else {
ocfs_release_lockres (lockres);
@@ -1367,9 +1381,8 @@
bool lockres_acq = false;
bool make_lock_master;
bool disk_vote = false;
- int kill_stale_lock = false;
- LOG_ENTRY_ARGS ("(osb=0x%08x, lres=0x%08x, fl=%u, up=%u, fe=0x%08x, "
+ LOG_ENTRY_ARGS ("(osb=0x%p, lres=0x%p, fl=%u, up=%u, fe=0x%p, "
"id=%u.%u ty=%u)\n", osb, lockres, flags, updated, fe,
HILO(lock_id), lock_type);
@@ -1389,9 +1402,10 @@
if ((flags & FLAG_FILE_DELETE) || (flags & FLAG_FILE_RENAME)) {
status = ocfs_get_x_for_del (osb, lock_id, lock_type, flags,
lockres, fe);
- if (status < 0)
- LOG_ERROR_STATUS (status);
-
+ if (status < 0) {
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
+ }
goto finally;
}
@@ -1498,13 +1512,19 @@
goto finally;
} else if (status == -EAGAIN) {
RELEASE_WITH_FLAG(lockres, lockres_acq);
+ ocfs_sleep (500);
+ if (ocfs_task_interruptible (osb)) {
+ LOG_TRACE_ARGS("interrupted... lockid=%u.%u\n",
+ HILO(lock_id));
+ status = -EINTR;
+ goto finally;
+ }
status = ocfs_disk_update_resource (osb, lockres, fe, 0);
if (status < 0) {
LOG_ERROR_STATUS (status);
osb->vol_state = VOLUME_DISABLED;
goto finally;
}
- ocfs_sleep (200);
continue;
} else {
RELEASE_WITH_FLAG(lockres, lockres_acq);
@@ -1518,18 +1538,20 @@
*/
#ifdef ENABLE_WAIT_FOR_LOCK_RELEASE
- if (lockres->lock_type <= OCFS_DLM_SHARED_LOCK || kill_stale_lock)
+ if (lockres->lock_type <= OCFS_DLM_SHARED_LOCK)
#else
if (true)
#endif
{
- if (kill_stale_lock)
- LOG_TRACE_STR ("Processing kill stale lock\n");
if ((flags & FLAG_FILE_DELETE) ||
(flags & FLAG_FILE_RENAME)) {
status = ocfs_get_x_for_del (osb, lock_id, lock_type,
flags, lockres, fe);
RELEASE_WITH_FLAG(lockres, lockres_acq);
+ if (status < 0) {
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
+ }
goto finally;
}
@@ -1539,8 +1561,16 @@
RELEASE_WITH_FLAG(lockres, lockres_acq);
if (status < 0) {
- if (status == -EAGAIN)
- continue;
+ if (status == -EAGAIN) {
+ ocfs_sleep (500);
+ if (ocfs_task_interruptible (osb)) {
+ LOG_TRACE_ARGS("interrupted... "
+ "lockid=%u.%u\n", HILO(lock_id));
+ status = -EINTR;
+ goto finally;
+ }
+ continue;
+ }
goto finally;
}
@@ -1570,14 +1600,13 @@
status = ocfs_wait_for_lock_release (osb, lock_id, 30000, lockres,
((flags & FLAG_DIR) ? OCFS_DLM_SHARED_LOCK : OCFS_DLM_NO_LOCK));
if (status < 0) {
- if (status == -ETIMEDOUT)
- {
- kill_stale_lock = true;
- status = 0;
- LOG_TRACE_ARGS ("(%d): setting kill_stale_lock, node which has lock: %d, level: %d\n",
- ocfs_getpid(), lockres->master_node_num, lockres->lock_type);
- continue;
- }
+ if (status == -ETIMEDOUT) {
+ LOG_TRACE_ARGS("lock %u.%u, level %d, not being "
+ "freed by node %u\n", HILO(lock_id),
+ lockres->lock_type, lockres->master_node_num);
+ continue;
+ } else if (status == -EINTR)
+ goto finally;
else
goto finally;
}
@@ -1607,7 +1636,7 @@
ocfs_file_entry *disklock = NULL;
__u32 updated = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u, %u, 0x%08x, 0x%08x)\n", osb,
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u, %u, 0x%p, 0x%p)\n", osb,
HI (lock_id), LO (lock_id), lock_type, flags, lockres,
lock_fe);
@@ -1645,7 +1674,8 @@
((*lockres)->master_node_num != osb->node_num)) {
status = ocfs_break_cache_lock (osb, *lockres, disklock);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
goto finally;
}
}
@@ -1669,8 +1699,9 @@
updated, disklock, lock_id,
lock_type);
if (status < 0) {
- LOG_ERROR_STATUS (status);
- goto finally;
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
+ goto finally;
}
break;
@@ -1707,7 +1738,7 @@
unsigned long jif;
bool disk_reset = true;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u, %u, 0x%08x)\n", osb, HI (lock_id),
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u, %u, 0x%p)\n", osb, HI (lock_id),
LO (lock_id), lock_type, flags, lockres);
if (fe == NULL) {
@@ -1756,6 +1787,7 @@
if (!(flags & FLAG_FILE_UPDATE_OIN) && !(flags & FLAG_FILE_DELETE))
goto finally;
+#if 0
if (comm_voting) {
LOG_TRACE_STR ("Network vote");
status = ocfs_send_dlm_request_msg (osb, lock_id, lock_type,
@@ -1771,8 +1803,33 @@
LOG_TRACE_STR ("Disk vote");
disk_vote = true;
jif = jiffies;
+#endif
status = -EAGAIN;
while (status == -EAGAIN) {
+ if (comm_voting && !disk_vote) {
+ LOG_TRACE_STR ("Network vote");
+ status = ocfs_send_dlm_request_msg (osb, lock_id, lock_type,
+ flags, lockres, votemap);
+ if (status >= 0) {
+ status = lockres->vote_status;
+ if (status >= 0) {
+ goto finally;
+ } else if (status == -EAGAIN) {
+ goto loop;
+ } else {
+ LOG_ERROR_STATUS (status);
+ goto finito;
+ }
+ } else if (status == -ETIMEDOUT) {
+ LOG_TRACE_STR ("Network voting timed out");
+ }
+ lockres->vote_state = 0;
+ }
+
+ LOG_TRACE_STR ("Disk vote");
+ disk_vote = true;
+ jif = jiffies;
+
disk_reset = false;
status = ocfs_request_vote (osb, lock_id, lock_type, flags,
votemap, &lockseqno);
@@ -1793,6 +1850,7 @@
if (status < 0) {
if (status == -EAGAIN)
goto reset;
+ LOG_ERROR_STATUS (status);
goto finito;
}
@@ -1808,6 +1866,10 @@
if (status != -EAGAIN)
break;
+
+ loop:
+ LOG_TRACE_ARGS ("id=%u.%u\n", HILO(lock_id));
+ ocfs_sleep (500);
}
finally:
@@ -1854,7 +1916,7 @@
int status = 0;
bool lock_acq = false;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u, %u, 0x%08x)\n", osb, HI (lock_id),
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u, %u, 0x%p)\n", osb, HI (lock_id),
LO (lock_id), lock_type, flags, lockres);
ocfs_acquire_lockres (lockres);
@@ -1916,7 +1978,6 @@
status = ocfs_disk_release_lock (osb, lock_id, lock_type, flags,
lockres, fe);
if (status < 0) {
- /* Disable the vol */
LOG_ERROR_STATUS (status);
goto finally;
}
@@ -2374,13 +2435,13 @@
unsigned long jif;
bool disk_reset = true;
- LOG_ENTRY ();
+ LOG_ENTRY_ARGS ("(osb=0x%p, lres=0x%p, fe=0x%p)\n", osb, lockres, fe);
/* Ask the node with cache to flush and revert to write thru on this file */
votemap = (1 << lockres->master_node_num);
jif = jiffies;
-
+#if 0
if (comm_voting) {
LOG_TRACE_STR ("Network vote");
status = ocfs_send_dlm_request_msg (osb, lockres->sector_num,
@@ -2400,6 +2461,7 @@
LOG_TRACE_STR ("Disk vote");
disk_vote = true;
jif = jiffies;
+#endif
status = -EAGAIN;
while (status == -EAGAIN) {
if (!IS_NODE_ALIVE (osb->publ_map, lockres->master_node_num,
@@ -2411,6 +2473,33 @@
goto finally;
}
+ if (comm_voting && !disk_vote) {
+ LOG_TRACE_STR ("Network vote");
+ jif = jiffies;
+ status = ocfs_send_dlm_request_msg (osb, lockres->sector_num,
+ lockres->lock_type,
+ FLAG_FILE_RELEASE_CACHE,
+ lockres, votemap);
+ if (status >= 0) {
+ status = lockres->vote_status;
+ if (status >= 0) {
+ lockres->lock_type = OCFS_DLM_NO_LOCK;
+ goto finally;
+ } else if (status == -EAGAIN) {
+ goto loop;
+ } else {
+ LOG_ERROR_STATUS (status);
+ goto finito;
+ }
+ } else if (status == -ETIMEDOUT) {
+ LOG_TRACE_STR ("Network voting timed out");
+ }
+ lockres->vote_state = 0;
+ }
+
+ LOG_TRACE_STR ("Disk vote");
+ disk_vote = true;
+ jif = jiffies;
disk_reset = false;
status = ocfs_request_vote (osb, lockres->sector_num,
lockres->lock_type,
@@ -2446,6 +2535,17 @@
if (status != -EAGAIN)
break;
+
+ loop:
+ LOG_TRACE_ARGS ("id=%u.%u\n", HILO(lockres->sector_num));
+ ocfs_sleep (500);
+
+ if (ocfs_task_interruptible (osb)) {
+ LOG_TRACE_ARGS("interrupted.... lockid=%u.%u\n",
+ HILO(lockres->sector_num));
+ status = -EINTR;
+ goto finito;
+ }
}
lockres->lock_type = (__u8) OCFS_DLM_NO_LOCK;
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgenmisc.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgenmisc.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgenmisc.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -319,7 +319,7 @@
int tmpstat;
__u64 allocSize = 0;
__u64 endofFile = 0;
- ocfs_inode *oin;
+ ocfs_inode *oin = NULL;
ocfs_vol_disk_hdr *volDiskHdr = NULL;
ocfs_lock_res *LockResource = NULL;
bool vol_locked = false;
@@ -401,9 +401,14 @@
}
/* This is for root . */
- ocfs_initialize_oin (oin, osb,
+ status = ocfs_initialize_oin (oin, osb,
OCFS_OIN_DIRECTORY | OCFS_OIN_ROOT_DIRECTORY, NULL,
0, osb->vol_layout.root_start_off);
+ if (status < 0) {
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
+ goto finally;
+ }
// oin->Parentoin = NULL; /* Root has no parent */
@@ -414,6 +419,9 @@
oin->dir_disk_off = osb->vol_layout.root_start_off;
finally:
+ if (status < 0 && oin)
+ ocfs_release_oin (oin, true);
+
if (vol_locked) {
tmpstat = ocfs_release_lock (osb, OCFS_VOLUME_LOCK_OFFSET,
OCFS_DLM_EXCLUSIVE_LOCK, 0,
@@ -558,7 +566,7 @@
osb->obj_id.type = OCFS_TYPE_OSB;
osb->obj_id.size = sizeof (ocfs_super);
-#ifdef x86_64
+#ifdef __LP64__
#define HASHBITS 11
#else
#define HASHBITS 12
@@ -578,9 +586,9 @@
#endif
ocfs_init_sem (&(osb->vol_alloc_lock));
+ init_MUTEX (&(osb->comm_lock));
+ init_MUTEX (&(osb->trans_lock));
- init_MUTEX (&(osb->comm_lock));
-
osb->node_recovering = OCFS_INVALID_NODE_NUM;
osb->needs_flush = false;
@@ -826,12 +834,6 @@
osb->publ_map |= (1 << osb->node_num);
- /* what's happening here? your guess is as good as mine :) */
- osb->hbt = 20 + jiffies;
-// ocfs_sleep (5000); /* 5 sec */
-// osb->hbt = 20 + jiffies;
-// ocfs_sleep (5000); /* 5 sec */
-
/* Create the Rootdirectory oin. */
osb->vol_state = VOLUME_INIT;
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgennm.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgennm.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgennm.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -80,7 +80,7 @@
int status = 0;
ocfs_file_entry *fe = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x)\n", osb, lock_res,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p)\n", osb, lock_res,
file_ent);
if (file_ent) {
@@ -137,7 +137,7 @@
int status = 0;
ocfs_lock_res *tmp_lockres = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, 0x%08x, 0x%08x, 0x%08x)\n", osb,
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, 0x%p, 0x%p, 0x%p)\n", osb,
HI (lock_id), LO (lock_id), lockres, fe,
updated);
@@ -233,22 +233,30 @@
ocfs_lock_res ** lockres)
{
int status = 0;
+ int tmpstat = 0;
__u32 flags = 0;
__u32 retry_cnt = 0;
bool acq_oin = false;
ocfs_file_entry *fe = NULL;
bool rls_oin = true;
+ ocfs_inode *oin = NULL;
ocfs_sem *oin_sem = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, 0x%08x, 0x%08x)\n", osb, publish,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, 0x%p, 0x%p)\n", osb, publish,
node_num, vote, lockres);
flags = publish->vote_type;
ocfs_acquire_lockres (*lockres);
- if ((*lockres)->oin) {
- UPDATE_OIN ((*lockres)->oin);
+ oin = (*lockres)->oin;
+ if (oin) {
+ ocfs_down_sem (&oin->main_res, true);
+ oin->needs_verification = true;
+ tmpstat = ocfs_verify_update_oin(osb, oin);
+ if (tmpstat < 0)
+ LOG_ERROR_STATUS (tmpstat);
+ ocfs_up_sem (&oin->main_res);
}
LOG_TRACE_ARGS ("node=%u, lockid=%u.%u, seq=%u.%u\n",
@@ -257,11 +265,7 @@
LO (publish->publ_seq_num));
/* Check for oin */
- if ((*lockres)->oin != NULL) {
- ocfs_inode *oin;
-
- oin = (*lockres)->oin;
-
+ if (oin) {
oin_sem = &(oin->main_res);
ocfs_down_sem (oin_sem, true);
acq_oin = true;
@@ -487,6 +491,7 @@
int ocfs_process_vote (ocfs_super * osb, ocfs_publish * publish, __u32 node_num)
{
int status = 0;
+ int tmpstat = 0;
ocfs_lock_res *lockres = NULL;
__u32 flags;
__u32 num_nodes;
@@ -495,7 +500,7 @@
ocfs_file_entry *fe = NULL;
ocfs_vote *vote = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n", osb, publish, node_num);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u)\n", osb, publish, node_num);
LOG_TRACE_ARGS ("node=%u, id=%u.%u, seq=%u.%u\n", node_num,
HI(publish->dir_ent), LO(publish->dir_ent),
@@ -548,16 +553,9 @@
if (flags & FLAG_FILE_RELEASE_CACHE) {
ocfs_file_entry *tmp_fe = NULL;
- i = 0;
if (!osb->commit_cache_exec) {
osb->needs_flush = true;
- while ((osb->trans_in_progress) && (i < 10)) {
- ocfs_sleep (100);
- i++;
- }
-
- status = -EFAIL;
-
+ ocfs_trans_in_progress(osb);
if (osb->trans_in_progress == false) {
osb->commit_cache_exec = true;
ocfs_commit_cache (osb, true);
@@ -594,9 +592,11 @@
}
ocfs_release_file_entry (tmp_fe);
vote->vote[node_num] = FLAG_VOTE_NODE;
- status = 0;
+ } else {
+ /* Ask for a retry as txn is in progress */
+ vote->vote[node_num] = FLAG_VOTE_UPDATE_RETRY;
+ vote->open_handle = false;
}
-
goto finito;
}
}
@@ -611,7 +611,10 @@
if (lockres->oin != NULL) {
oin = lockres->oin;
ocfs_down_sem (&(oin->main_res), true);
- UPDATE_OIN (lockres->oin);
+ oin->needs_verification = true;
+ tmpstat = ocfs_verify_update_oin(osb, oin);
+ if (tmpstat < 0)
+ LOG_ERROR_STATUS (tmpstat);
ocfs_up_sem (&(oin->main_res));
vote->dir_ent = publish->dir_ent;
@@ -636,14 +639,7 @@
/* I am currently the master of the lock */
if (flags & FLAG_CHANGE_MASTER) {
osb->needs_flush = true;
-
- while ((osb->trans_in_progress) && (i < 10)) {
- ocfs_sleep (100);
- i++;
- }
-
- status = -EFAIL;
-
+ ocfs_trans_in_progress(osb);
if (osb->trans_in_progress == false) {
__u64 tmp = publish->dir_ent;
@@ -676,7 +672,10 @@
}
lockres->master_node_num = node_num;
vote->vote[node_num] = FLAG_VOTE_NODE;
- status = 0;
+ } else {
+ /* Ask for a retry as txn is in progress */
+ vote->vote[node_num] = FLAG_VOTE_UPDATE_RETRY;
+ vote->open_handle = false;
}
} else if (flags & FLAG_ADD_OIN_MAP) {
status = ocfs_get_file_entry (osb, &fe, publish->dir_ent);
@@ -760,12 +759,6 @@
ocfs_put_lockres(lockres);
-//SM if (lockres && lockres->oin==NULL) {
-//SM ocfs_hash_del (&(osb->root_sect_node), &(lockres->sector_num),
-//SM sizeof (__u64));
-//SM ocfs_free_lockres(lockres);
-//SM }
-
LOG_EXIT_STATUS (status);
return status;
} /* ocfs_process_vote */
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgentrans.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgentrans.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgentrans.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -55,7 +55,7 @@
ocfs_file_entry *fe = NULL;
ocfs_bitmap_lock *bm_lock = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", osb, log_rec);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", osb, log_rec);
#define ALLOC_BLOCK(ptr, len, err) \
do { \
@@ -313,7 +313,7 @@
ocfs_lock_res **lock_res_array = NULL;
ocfs_lock_res *tmp_lockres;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", osb, buffer);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", osb, buffer);
log_rec = (ocfs_log_record *) buffer;
clean_rec = (ocfs_cleanup_record *) buffer;
@@ -595,7 +595,7 @@
ocfs_log_record *log_rec = NULL;
bool use_prealloc = false;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, %u, 0x%08x)\n", osb, HI (trans_id),
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, %u, 0x%p)\n", osb, HI (trans_id),
LO (trans_id), node_num, type);
log_type = *type;
@@ -709,8 +709,10 @@
*/
int ocfs_start_trans (ocfs_super * osb)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", osb);
+ LOG_ENTRY_ARGS ("(0x%p)\n", osb);
+ down (&osb->trans_lock);
+
osb->curr_trans_id = osb->vol_node_map.largest_seq_num;
if (osb->needs_flush) {
@@ -719,7 +721,6 @@
}
osb->trans_in_progress = true;
- LOG_TRACE_STR ("tip=true");
LOG_EXIT_STATUS (0);
return 0;
@@ -737,7 +738,7 @@
__u64 offset = 0;
__u32 log_type;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n", osb, HI (trans_id), LO (trans_id));
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u)\n", osb, HI (trans_id), LO (trans_id));
/* Log to the file for multiple transactions... */
status = ocfs_extend_system_file (osb,
@@ -766,7 +767,7 @@
finally:
osb->trans_in_progress = false;
- LOG_TRACE_STR ("tip=false");
+ up (&osb->trans_lock);
LOG_EXIT_STATUS (status);
return status;
@@ -784,7 +785,7 @@
__u64 offset = 0;
__u32 log_type;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n", osb, HI (trans_id), LO (trans_id));
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u)\n", osb, HI (trans_id), LO (trans_id));
/* Read the log file and free up stf... */
log_type = LOG_RECOVER;
@@ -813,7 +814,7 @@
finally:
osb->trans_in_progress = false;
- LOG_TRACE_STR ("tip=false");
+ up (&osb->trans_lock);
LOG_EXIT_STATUS (status);
return status;
@@ -834,7 +835,7 @@
ocfs_publish *publish = NULL;
__u64 node_publ_off;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n", osb, HI (node_num), LO (node_num));
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u)\n", osb, HI (node_num), LO (node_num));
/* Read the publish sector */
node_publ_off = osb->vol_layout.publ_sect_off +
@@ -888,7 +889,7 @@
__u32 file_id;
ocfs_file_entry *fe = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n", osb, HI (node_num), LO (node_num));
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u)\n", osb, HI (node_num), LO (node_num));
fe = ocfs_allocate_file_entry ();
if (fe == NULL) {
@@ -1070,7 +1071,7 @@
bool lock_acq = false;
ocfs_file_entry *fe = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n", osb, log_rec, type);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u)\n", osb, log_rec, type);
fe = ocfs_allocate_file_entry ();
if (!fe) {
@@ -1178,7 +1179,7 @@
bool lock_acq = false;
ocfs_file_entry *fe = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n", osb, log_rec, node_num,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u)\n", osb, log_rec, node_num,
type);
fe = ocfs_allocate_file_entry ();
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsgenvote.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsgenvote.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsgenvote.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -83,12 +83,14 @@
ocfs_dlm_msg * dlm_msg)
{
int status = 0;
+ int tmpstat = 0;
ocfs_dlm_req_master *req_master;
__u32 node_num;
__u32 flags;
__u32 retry_cnt = 0;
bool acq_oin = false;
ocfs_file_entry *fe = NULL;
+ ocfs_inode *oin = NULL;
ocfs_sem *oin_sem = NULL;
struct dentry *dentry;
struct list_head *iter;
@@ -103,20 +105,21 @@
flags = req_master->flags;
node_num = dlm_msg->src_node;
- if ((*lockres)->oin) {
- UPDATE_OIN ((*lockres)->oin);
+ oin = (*lockres)->oin;
+ if (oin) {
+ ocfs_down_sem (&oin->main_res, true);
+ oin->needs_verification = true;
+ tmpstat = ocfs_verify_update_oin(osb, oin);
+ if (tmpstat < 0)
+ LOG_ERROR_STATUS (tmpstat);
+ ocfs_up_sem (&oin->main_res);
}
LOG_TRACE_ARGS ("node=%u, lockid=%u.%u, seq=%u.%u\n", node_num,
- HI (req_master->lock_id), LO (req_master->lock_id),
- HI (req_master->lock_seq_num), LO (req_master->lock_seq_num));
+ HILO (req_master->lock_id), HILO (req_master->lock_seq_num));
/* Check for oin */
- if ((*lockres)->oin != NULL) {
- ocfs_inode *oin;
-
- oin = (*lockres)->oin;
-
+ if (oin) {
oin_sem = &(oin->main_res);
ocfs_down_sem (oin_sem, true);
acq_oin = true;
@@ -350,6 +353,7 @@
int ocfs_comm_process_vote (ocfs_super * osb, ocfs_dlm_msg * dlm_msg)
{
int status = 0;
+ int tmpstat = 0;
ocfs_lock_res *lockres = NULL;
ocfs_dlm_req_master *req_master;
__u32 node_num = OCFS_INVALID_NODE_NUM;
@@ -358,7 +362,6 @@
__u32 length;
ocfs_file_entry *fe = NULL;
ocfs_file_entry *temp_fe = NULL;
- __u32 i;
ocfs_inode *oin;
bool oin_exists;
@@ -366,9 +369,8 @@
req_master = (ocfs_dlm_req_master *) dlm_msg->msg_buf;
- LOG_TRACE_ARGS("node=%d, lockid=%u.%u, seq=%u.%u\n", dlm_msg->src_node,
- HI(req_master->lock_id), LO(req_master->lock_id),
- HI(req_master->lock_seq_num), LO(req_master->lock_seq_num));
+ LOG_TRACE_ARGS ("ocfs: req node=%d, lockid=%u.%u, seq=%u.%u\n", dlm_msg->src_node,
+ HILO (req_master->lock_id), HILO (req_master->lock_seq_num));
status = ocfs_find_create_lockres (osb, req_master->lock_id, &lockres);
if (status < 0) {
@@ -380,7 +382,8 @@
LOG_ERROR_STATUS (status);
goto finally;
}
- LOG_TRACE_STR ("vote=FLAG_VOTE_OIN_UPDATED");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=OIN_UPDATED\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_OIN_UPDATED, false);
status = 0;
} else
@@ -414,13 +417,8 @@
if (flags & FLAG_FILE_RELEASE_CACHE) {
if (!osb->commit_cache_exec) {
osb->needs_flush = true;
+ ocfs_trans_in_progress(osb);
- i = 0;
- while ((osb->trans_in_progress) && (i < 10)) {
- ocfs_sleep (100);
- i++;
- }
-
if (osb->trans_in_progress == false) {
osb->commit_cache_exec = true;
ocfs_commit_cache (osb, true);
@@ -456,7 +454,8 @@
temp_fe = NULL;
}
- LOG_TRACE_STR ("vote=FLAG_VOTE_NODE");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_NODE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_NODE, false);
status = 0;
goto finally;
@@ -467,7 +466,10 @@
if (lockres->oin != NULL) {
oin = lockres->oin;
ocfs_down_sem (&(oin->main_res), true);
- UPDATE_OIN (lockres->oin);
+ oin->needs_verification = true;
+ tmpstat = ocfs_verify_update_oin(osb, oin);
+ if (tmpstat < 0)
+ LOG_ERROR_STATUS (tmpstat);
ocfs_up_sem (&(oin->main_res));
} else {
status = ocfs_process_update_inode_request (osb,
@@ -478,7 +480,8 @@
goto finally;
}
}
- LOG_TRACE_STR ("vote=FLAG_VOTE_OIN_UPDATED");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=OIN_UPDATE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_OIN_UPDATED, false);
status = 0;
goto finally;
@@ -511,7 +514,8 @@
}
lockres->master_node_num = node_num;
- LOG_TRACE_STR ("vote=FLAG_VOTE_NODE");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_NODE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_NODE, false);
goto finally;
} else if (flags & FLAG_ADD_OIN_MAP) {
@@ -525,7 +529,8 @@
if ((fe->sync_flags & OCFS_SYNC_FLAG_NAME_DELETED) ||
(!(fe-> sync_flags & OCFS_SYNC_FLAG_VALID))) {
- LOG_TRACE_STR ("vote=FLAG_VOTE_FILE_DEL");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=FILE_DEL\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_FILE_DEL, false);
goto finally;
@@ -541,7 +546,8 @@
/* Add this node to the oin map on the file entry */
lockres->oin_openmap = DISK_LOCK_OIN_MAP (fe);
- LOG_TRACE_STR ("vote=FLAG_VOTE_NODE");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_NODE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_NODE, false);
goto finally;
@@ -551,7 +557,8 @@
if (IS_NODE_ALIVE (osb->publ_map, lockres->master_node_num,
OCFS_MAXIMUM_NODES)) {
/* We have no business voting on this lock */
- LOG_TRACE_STR ("vote=FLAG_VOTE_UPDATE_RETRY");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=RETRY\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_UPDATE_RETRY, false);
} else {
@@ -564,7 +571,8 @@
(node_num < osb->node_num)) {
/* If our node number is > his we win */
/* so send a mesg to him to retry */
- LOG_TRACE_STR ("vote=FLAG_VOTE_UPDATE_RETRY");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=RETRY\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_UPDATE_RETRY, oin_exists);
goto finally;
@@ -576,7 +584,8 @@
oin_exists = true;
}
}
- LOG_TRACE_STR ("vote=FLAG_VOTE_NODE");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_NODE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_NODE, oin_exists);
}
@@ -589,7 +598,8 @@
(node_num < osb->node_num)) {
/* If our node number is > his we win so send a mesg */
/* to him to retry */
- LOG_TRACE_STR ("vote=FLAG_VOTE_UPDATE_RETRY");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=RETRY\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg,
FLAG_VOTE_UPDATE_RETRY, oin_exists);
goto finally;
@@ -602,7 +612,8 @@
}
}
- LOG_TRACE_STR ("vote=FLAG_VOTE_NODE");
+ LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_NODE\n",
+ HILO (req_master->lock_seq_num));
ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_NODE, oin_exists);
goto finally;
}
@@ -638,7 +649,8 @@
status = ocfs_lookup_sector_node (osb, reply_msg->lock_id, &lockres);
if (status < 0) {
- LOG_ERROR_STATUS (status);
+ LOG_TRACE_ARGS ("status=%d, id=%u.%u\n", status,
+ HILO(reply_msg->lock_id));
goto bail;
}
@@ -648,10 +660,9 @@
goto bail;
}
- LOG_TRACE_ARGS("node=%u, lockid=%u.%u, seq=%u.%u, vote=%d\n",
- dlm_msg->src_node, HI(reply_msg->lock_id),
- LO(reply_msg->lock_id), HI(reply_msg->lock_seq_num),
- LO(reply_msg->lock_seq_num), reply->status);
+ LOG_TRACE_ARGS ("ocfs: reply node=%u, lockid=%u.%u, seq=%u.%u, vote=0x%x\n",
+ dlm_msg->src_node, HILO (reply_msg->lock_id),
+ HILO (reply_msg->lock_seq_num), reply->status);
switch (reply->status) {
case FLAG_VOTE_NODE:
@@ -685,6 +696,9 @@
}
if (lockres->vote_status != 0) {
+ LOG_TRACE_ARGS ("ocfs: NO lockid=%u.%u, map=0x%08x, status=%d\n",
+ HILO (lockres->sector_num), LO(lockres->got_vote_map),
+ lockres->vote_status);
lockres->vote_state = 0;
atomic_set (&lockres->voted_event_woken, 1);
wake_up (&lockres->voted_event);
@@ -696,9 +710,8 @@
(reply_msg->flags & FLAG_FILE_UPDATE))
lockres->oin_openmap = lockres->tmp_openmap;
lockres->tmp_openmap = 0;
- LOG_TRACE_ARGS ("OK vote, lockid=%u.%u, map: 0x%08x\n",
- HI(lockres->sector_num), LO(lockres->sector_num),
- LO(lockres->got_vote_map));
+ LOG_TRACE_ARGS ("ocfs: OK lockid=%u.%u, map=0x%08x\n",
+ HILO (lockres->sector_num), LO(lockres->got_vote_map));
lockres->vote_state = 0;
atomic_set (&lockres->voted_event_woken, 1);
wake_up (&lockres->voted_event);
@@ -833,16 +846,19 @@
void ocfs_comm_process_dismount (ocfs_super * osb, ocfs_dlm_msg * dlm_msg)
{
ocfs_dlm_req_master *req_master;
+ __u32 src_node;
LOG_ENTRY ();
req_master = (ocfs_dlm_req_master *) dlm_msg->msg_buf;
+ src_node = dlm_msg->src_node;
- LOG_TRACE_ARGS("node=%d", dlm_msg->src_node);
- printk ("ocfs: Received dismount message from node %d\n",
- dlm_msg->src_node);
+ printk ("ocfs: Received dismount message for device (%u,%u) "
+ "from %s (node %d)\n", MAJOR(osb->sb->s_dev),
+ MINOR(osb->sb->s_dev), osb->node_cfg_info[src_node]->node_name,
+ src_node);
- atomic_set (&(osb->vol_node_map.dismount[dlm_msg->src_node]), 1);
+ atomic_set (&(osb->vol_node_map.dismount[src_node]), 1);
LOG_EXIT ();
return ;
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsheartbeat.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsheartbeat.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsheartbeat.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -53,7 +53,7 @@
int status = 0;
__u64 node_publ_off = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %u, %s)\n", osb, flag,
+ LOG_ENTRY_ARGS ("(0x%p, %u, %s)\n", osb, flag,
read_publish ? "true" : "false");
if (flag & HEARTBEAT_METHOD_DISK) {
@@ -146,12 +146,7 @@
if (osb->vol_state == VOLUME_MOUNTED) {
if (osb->needs_flush) {
- i = 0;
- while ((osb->trans_in_progress) && (i < 10)) {
- ocfs_sleep (100);
- i++;
- }
-
+ ocfs_trans_in_progress(osb);
if (osb->trans_in_progress == false) {
ocfs_commit_cache (osb, false);
osb->needs_flush = false;
@@ -201,9 +196,11 @@
ocfs_update_publish_map (osb, buffer, false);
/* send signal to mount thread to continue */
- if (atomic_read (&osb->nm_init) == 0) {
- atomic_set (&osb->nm_init, 1);
+ if (atomic_read (&osb->nm_init) < OCFS_HEARTBEAT_INIT) {
+ atomic_inc (&osb->nm_init);
+ } else if (atomic_read (&osb->nm_init) == OCFS_HEARTBEAT_INIT) {
wake_up (&osb->nm_init_event);
+ atomic_inc (&osb->nm_init);
}
LOG_TRACE_ARGS ("Publish map: 0x%08x\n", LO (osb->publ_map));
@@ -280,7 +277,7 @@
__u32 num_nodes;
__u8 *p;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n", osb, buffer, first_time);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u)\n", osb, buffer, first_time);
num_nodes = OCFS_MAXIMUM_NODES;
node_map = &(osb->vol_node_map);
@@ -328,8 +325,11 @@
(node_map->miss_cnt[i])++;
if (node_map->miss_cnt[i] > MISS_COUNT_VALUE) {
#if !defined(USERSPACE_TOOL)
- printk ("ocfs: Removing node %d from "
- "cluster\n", i);
+ printk ("ocfs: Removing %s (node %d) "
+ "from clustered device (%u,%u)\n",
+ osb->node_cfg_info[i]->node_name, i,
+ MAJOR(osb->sb->s_dev),
+ MINOR(osb->sb->s_dev));
#endif
UPDATE_PUBLISH_MAP (osb->publ_map, i,
OCFS_PUBLISH_CLEAR, num_nodes);
@@ -337,8 +337,13 @@
}
} else {
#if !defined(USERSPACE_TOOL)
- if (!IS_NODE_ALIVE(osb->publ_map, i, num_nodes))
- printk ("ocfs: Adding node %d to cluster\n", i);
+ if (!IS_NODE_ALIVE(osb->publ_map, i, num_nodes) &&
+ osb->node_num != i)
+ printk ("ocfs: Adding %s (node %d) to "
+ "clustered device (%u,%u)\n",
+ osb->node_cfg_info[i]->node_name, i,
+ MAJOR(osb->sb->s_dev),
+ MINOR(osb->sb->s_dev));
#endif
node_map->miss_cnt[i] = 0;
node_map->time[i] = publish->time;
Modified: branches/ocfs-1.0/ocfs2/Common/ocfsver.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Common/ocfsver.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Common/ocfsver.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,7 +1,29 @@
-#include <linux/kernel.h>
+/*
+ * ocfsver.c
+ *
+ * prints the version string
+ *
+ * Copyright (C) 2003 Oracle Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran, Manish Singh, Wim Coekaerts
+ */
-#include <ocfsver.h>
-#include <linux/module.h>
+#include <ocfs.h>
MODULE_DESCRIPTION("The Oracle Cluster Filesystem (version "
OCFS_BUILD_VERSION
@@ -9,10 +31,14 @@
char *ocfs_version = OCFS_BUILD_VERSION;
+/*
+ * ocfs_version_print()
+ *
+ */
void ocfs_version_print (void)
{
printk(KERN_INFO "Oracle Cluster FileSystem "
OCFS_BUILD_VERSION " "
OCFS_BUILD_DATE " "
"(build " OCFS_BUILD_MD5 ")\n");
-}
+} /* ocfs_version_print */
Modified: branches/ocfs-1.0/ocfs2/Linux/inc/ocfsmain.h
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/inc/ocfsmain.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/inc/ocfsmain.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -140,10 +140,8 @@
static void ocfs_set_exclusive_mount_flag (struct super_block *sb, int val);
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,10)
static ssize_t ocfs_rw_direct (int rw, struct file *filp, char *buf,
size_t size, loff_t * offp);
-#endif
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,10)
static int ocfs_direct_IO (int rw,
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsbitmap.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsbitmap.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsbitmap.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -27,7 +27,7 @@
#if defined(__KERNEL__)
#include <ocfs.h>
#else
-#include <asm/bitops.h>
+//#include <asm/bitops.h>
#include <debugocfs.h>
#endif
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsdlm.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsdlm.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsdlm.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -40,7 +40,7 @@
int status = 0;
__u32 tmp;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", osb, lock_res);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", osb, lock_res);
if (HASHTABLE_DESTROYED (&(osb->root_sect_node))) {
LOG_TRACE_STATUS (status = -EFAIL);
@@ -61,14 +61,14 @@
if (*found_lock_res) {
ocfs_get_lockres (*found_lock_res);
- LOG_TRACE_ARGS ("isn: fres=0x%08x, ref=%d, lid=%u.%u\n",
+ LOG_TRACE_ARGS ("isn: fres=0x%p, ref=%d, lid=%u.%u\n",
*found_lock_res,
atomic_read (&((*found_lock_res)->lr_ref_cnt)),
HILO((*found_lock_res)->sector_num));
}
else {
ocfs_get_lockres (lock_res);
- LOG_TRACE_ARGS ("isn: lres=0x%08x, ref=%d, lid=%u.%u\n", lock_res,
+ LOG_TRACE_ARGS ("isn: lres=0x%p, ref=%d, lid=%u.%u\n", lock_res,
atomic_read (&lock_res->lr_ref_cnt),
HILO(lock_res->sector_num));
}
@@ -87,7 +87,7 @@
int status = 0;
__u32 len = 0;
- LOG_ENTRY_ARGS ("(0x%08x, %u.%u, 0x%08x)\n", osb, HI (lock_id),
+ LOG_ENTRY_ARGS ("(0x%p, %u.%u, 0x%p)\n", osb, HI (lock_id),
LO (lock_id), lock_res);
if (HASHTABLE_DESTROYED (&(osb->root_sect_node))) {
@@ -109,7 +109,7 @@
}
ocfs_get_lockres (*lock_res);
- LOG_TRACE_ARGS ("lsn: lid=%u.%u, lres=0x%08x, ref=%d\n",
+ LOG_TRACE_ARGS ("lsn: lid=%u.%u, lres=0x%p, ref=%d\n",
HILO(lock_id), *lock_res,
atomic_read (&((*lock_res)->lr_ref_cnt)));
} else
@@ -127,7 +127,7 @@
*/
void ocfs_remove_sector_node (ocfs_super * osb, ocfs_lock_res * lock_res)
{
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", osb, lock_res);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", osb, lock_res);
if (HASHTABLE_DESTROYED (&(osb->root_sect_node))) {
LOG_TRACE_STATUS (-EFAIL);
@@ -139,7 +139,7 @@
goto bail;
}
- LOG_TRACE_ARGS ("rsn: lres=0x%08x, ref=%d, lid=%u.%u\n", lock_res,
+ LOG_TRACE_ARGS ("rsn: lres=0x%p, ref=%d, lid=%u.%u\n", lock_res,
atomic_read (&lock_res->lr_ref_cnt),
HILO(lock_res->sector_num));
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsfile.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsfile.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsfile.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -112,7 +112,7 @@
if (status < 0) {
if (status != -ENOTEMPTY && status != -EPERM &&
- status != -EBUSY)
+ status != -EBUSY && status != -EINTR)
LOG_ERROR_STATUS(status);
if (OIN) {
ocfs_down_sem (&(OIN->main_res), true);
@@ -207,8 +207,10 @@
/* OIN exists and it's not marked for deletion! */
ocfs_down_sem (&(newOIN->main_res), true);
OCFS_SET_FLAG (newOIN->oin_flags, OCFS_OIN_IN_USE);
+ status = ocfs_verify_update_oin (osb, newOIN);
+ if (status < 0)
+ LOG_ERROR_STATUS (status);
ocfs_up_sem (&(newOIN->main_res));
- status = ocfs_verify_update_oin (osb, newOIN);
DeleteTargetOin = true;
}
}
@@ -262,6 +264,7 @@
status = ocfs_del_file (osb, oldDirOff, FLAG_DEL_NAME, oldOffset);
if (status < 0) {
+ if (status != -ENOTEMPTY && status != -EINTR)
LOG_ERROR_STATUS (status);
goto finally;
}
@@ -287,6 +290,7 @@
status = ocfs_create_file (osb, newDirOff, oldfe);
if (status < 0) {
+ if (status != -EINTR)
LOG_ERROR_STATUS (status);
goto finally;
}
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsioctl.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsioctl.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsioctl.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -42,7 +42,7 @@
ocfs_super *osb;
ocfs_cdsl cdsl;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %lu)\n", inode, filp, cmd, arg);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %lu)\n", inode, filp, cmd, arg);
if (_IOC_TYPE (cmd) != OCFS_IOC_MAGIC) {
ret = -ENOTTY;
@@ -67,8 +67,10 @@
copy_from_user (&cdsl, (void *) arg,
sizeof (ocfs_cdsl));
if (!ret) {
- if (ocfs_create_delete_cdsl (inode, filp, osb, &cdsl) < 0) {
- ret = -EINVAL;
+ ret = ocfs_create_delete_cdsl (inode, filp, osb, &cdsl);
+ if (ret < 0) {
+ if (ret != -EINTR)
+ ret = -EINVAL;
}
}
break;
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsiosup.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsiosup.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsiosup.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -47,7 +47,7 @@
struct buffer_head **bhs = NULL;
char *kaddr;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u.%u)\n", osb, Buffer, Length,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u.%u)\n", osb, Buffer, Length,
HI (Offset), LO (Offset));
#ifdef NO_CACHE
@@ -119,10 +119,12 @@
kaddr = kmap(bh->b_page);
#ifdef NO_CACHE
if (nr == 1 && Offset >= osb->vol_layout.data_start_off &&
+ (memcmp(kaddr + ((unsigned long)(bh)->b_data & ~PAGE_MASK), Buffer, 512) == 0))
#else
if (Cached && nr == 1 && Offset >= osb->vol_layout.data_start_off &&
+ (memcmp(kaddr + ((unsigned long)(bh)->b_data & ~PAGE_MASK), Buffer, 512) == 0))
#endif
- (memcmp(kaddr + ((unsigned long)(bh)->b_data & ~PAGE_MASK), Buffer, 512) == 0) ) {
+ {
kunmap(bh->b_page);
unlock_buffer(bh);
brelse(bh);
@@ -176,7 +178,7 @@
struct buffer_head **bhs = NULL;
char *kaddr;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u.%u)\n", osb, Buffer, Length,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u.%u)\n", osb, Buffer, Length,
HI (Offset), LO (Offset));
#ifdef NO_CACHE
@@ -262,7 +264,7 @@
__s64 tempLbo = 0;
bool bRet = false;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u.%u)\n", osb, Buffer, Length,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u.%u)\n", osb, Buffer, Length,
HI (Offset), LO (Offset));
tempLbo = tempVbo = Offset;
@@ -314,7 +316,7 @@
bool free_data=false, free_md=false;
ocfs_io_runs *IoDataRuns = NULL, *IoMetaDataRuns = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u.%u)\n", osb, Buffer, Length,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u.%u)\n", osb, Buffer, Length,
HI (Offset), LO (Offset));
/* try to use prealloc ioruns if available */
@@ -345,7 +347,7 @@
free_md=true;
IoMetaDataRuns = ocfs_malloc (IORUN_ALLOC_SIZE);
if (IoMetaDataRuns == NULL) {
- LOG_ERROR_STATUS (status -ENOMEM);
+ LOG_ERROR_STATUS (status = -ENOMEM);
goto finally;
}
}
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsmain.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsmain.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsmain.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -46,6 +46,7 @@
__u32 osb_id; /* Keeps track of next available OSB Id */
spinlock_t mount_cnt_lock;
__u32 mount_cnt; /* Number of volumes currently mounted */
+bool mount_cnt_inc; /* true when mount_cnt is inc by 1 during first mount */
#define KERN_OCFS 989
static ctl_table ocfs_dbg_table[] = {
@@ -103,6 +104,10 @@
.prepare_write = ocfs_prepare_write,
.commit_write = ocfs_commit_write,
#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,10)
+ /*
+ * we are only adding this here as a dummy basically, just need open with O_DIRECT
+ * to succeed, we still call ocfs_rw_direct()
+ */
.direct_IO = ocfs_direct_IO
#endif
};
@@ -293,6 +298,7 @@
sb->s_magic = OCFS_MAGIC;
sb->s_op = &ocfs_sops;
+ sb->s_flags |= MS_NOATIME;
/* this is needed to support O_LARGE_FILE */
sb->s_maxbytes = OCFS_LINUX_MAX_FILE_SIZE;
@@ -300,7 +306,10 @@
status = ocfs_mount_volume (sb, reclaim_id);
osb = ((ocfs_super *)(sb->u.generic_sbp));
if (status < 0 || !osb)
+ if (status < 0 || !osb) {
+ LOG_ERROR_STR ("Error mounting volume");
goto read_super_error;
+ }
#ifdef ALLOW_CACHE_MOUNT
osb->cache_fs = c; /* set caching type */
@@ -323,6 +332,10 @@
sb->s_root = root;
+ printk ("ocfs: Mounting device (%u,%u) on %s (node %d)\n",
+ MAJOR(sb->s_dev), MINOR(sb->s_dev),
+ osb->node_cfg_info[osb->node_num]->node_name, osb->node_num);
+
LOG_EXIT_PTR (sb);
return sb;
@@ -406,6 +419,7 @@
spin_lock_init (&mount_cnt_lock);
spin_lock (&mount_cnt_lock);
mount_cnt = 0;
+ mount_cnt_inc = false;
spin_unlock (&mount_cnt_lock);
spin_lock_init (&OcfsGlobalCtxt.comm_seq_lock);
@@ -433,9 +447,9 @@
LOG_EXIT_STATUS (status);
- if (status >= 0)
+ if (status >= 0) {
return register_filesystem (&ocfs_fs_type);
- else
+ } else
return -1;
} /* ocfs_driver_entry */
@@ -562,7 +576,6 @@
ocfs_super *osb = NULL;
struct list_head *osb_entry;
struct list_head *osb_tmp;
- __u32 i = 0;
LOG_ENTRY ();
@@ -581,10 +594,7 @@
ocfs_up_sem (&osb->osb_res);
osb->needs_flush = true;
- while ((osb->trans_in_progress) && (i < 10)) {
- ocfs_sleep (100);
- i++;
- }
+ ocfs_trans_in_progress(osb);
ocfs_commit_cache (osb, true);
osb->needs_flush = false;
@@ -630,7 +640,7 @@
__u64 fileOff, parentOff;
mode_t mode;
- LOG_ENTRY_ARGS ("(0x%08x, %u, 0x%08x)\n", inode, ino, opaque);
+ LOG_ENTRY_ARGS ("(0x%p, %u, 0x%p)\n", inode, ino, opaque);
if (opaque == NULL || inode == NULL)
goto bail;
@@ -715,7 +725,7 @@
ocfs_super *osb;
__u64 offset;
- LOG_ENTRY_ARGS ("(0x%08x, %u, size:%u)\n", inode, mode, fe->file_size);
+ LOG_ENTRY_ARGS ("(0x%p, %u, size:%u)\n", inode, mode, fe->file_size);
sb = inode->i_sb;
osb = ((ocfs_super *)(sb->u.generic_sbp));
@@ -728,6 +738,8 @@
inode->i_blksize = (__u32) osb->vol_layout.cluster_size; // sb->s_blocksize;
inode->i_blocks = (fe->file_size + sb->s_blocksize) >> sb->s_blocksize_bits;
inode->i_mapping->a_ops = &ocfs_aops;
+ inode->i_attr_flags |= ATTR_FLAG_NOATIME;
+ inode->i_flags |= S_NOATIME;
inode->i_atime = fe->modify_time;
inode->i_mtime = fe->modify_time;
inode->i_ctime = fe->create_time;
@@ -779,7 +791,7 @@
ocfs_inode *newoin;
umode_t mode;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", inode, opaque);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", inode, opaque);
if (inode == NULL || inode->i_sb == NULL) {
LOG_ERROR_STR ("bad inode");
@@ -794,6 +806,8 @@
inode->i_blocks = OCFS_DEFAULT_DIR_NODE_SIZE;
inode->i_rdev = inode->i_dev; /* is this correct?! */
inode->i_mapping->a_ops = &ocfs_aops;
+ inode->i_attr_flags |= ATTR_FLAG_NOATIME;
+ inode->i_flags |= S_NOATIME;
inode->i_atime = CURRENT_TIME;
inode->i_mtime = CURRENT_TIME;
inode->i_ctime = CURRENT_TIME;
@@ -875,7 +889,7 @@
struct dentry *ret;
ocfs_super *osb = ((ocfs_super *)(sb->u.generic_sbp));
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", dir, dentry,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
atomic_inc (&dir->i_count);
@@ -941,7 +955,7 @@
__u8 lockbuf[512];
ocfs_bitmap_lock *bm_lock = (ocfs_bitmap_lock *)lockbuf;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n", sb, buf);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", sb, buf);
osb = ((ocfs_super *)(sb->u.generic_sbp));
numbits = osb->cluster_bitmap.size;
@@ -951,13 +965,17 @@
if (numbits >= bm_lock->used_bits)
freebits = numbits - bm_lock->used_bits;
+ /* take out the space reserved for system files */
+ freebits -= (8 * ONE_MEGA_BYTE / osb->vol_layout.cluster_size);
+
buf->f_type = OCFS_MAGIC;
buf->f_bsize = sb->s_blocksize;
buf->f_namelen = OCFS_MAX_FILENAME_LENGTH;
buf->f_blocks =
(unsigned long) ((unsigned long) (numbits) *
(unsigned long) (osb->vol_layout.
- cluster_size >> 9));
+ cluster_size >> 9) - (8 * ONE_MEGA_BYTE / osb->vol_layout.cluster_size)
+ );
buf->f_bfree =
(unsigned long) (freebits * (osb->vol_layout.cluster_size >> 9));
buf->f_bavail = buf->f_bfree;
@@ -976,16 +994,24 @@
*/
static int ocfs_block_symlink (struct inode *inode, const char *symname, int len)
{
- struct address_space *mapping = inode->i_mapping;
- struct page *page = grab_cache_page (mapping, 0);
+ struct address_space *mapping;
+ struct page *page;
int err = -ENOMEM;
char *kaddr;
+ LOG_ENTRY ();
+
+ mapping = inode->i_mapping;
+ page = grab_cache_page (mapping, 0);
+
if (!page)
goto fail;
err = mapping->a_ops->prepare_write (NULL, page, 0, len - 1);
- if (err)
+ if (err) {
+ LOG_ERROR_STATUS (err);
goto fail_map;
+ }
+
kaddr = page_address (page);
memset (kaddr, 0, PAGE_CACHE_SIZE);
memcpy (kaddr, symname, len - 1);
@@ -993,8 +1019,11 @@
err = mapping->a_ops->readpage (NULL, page);
wait_on_page (page);
page_cache_release (page);
- if (err < 0)
+ if (err < 0) {
+ LOG_ERROR_STATUS (err);
goto fail;
+ }
+
mark_inode_dirty (inode);
return 0;
@@ -1002,6 +1031,7 @@
UnlockPage (page);
page_cache_release (page);
fail:
+ LOG_EXIT_STATUS (err);
return err;
} /* ocfs_block_symlink */
@@ -1018,7 +1048,7 @@
ocfs_file_entry *fe = NULL;
__u64 entryOffset;
- LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n", inode, iblock, bh_result,
+ LOG_ENTRY_ARGS ("(0x%p, %d, 0x%p, %d)\n", inode, iblock, bh_result,
create);
if (!inode) {
@@ -1088,7 +1118,7 @@
int status;
void *ioRuns = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n", inode, iblock, bh_result,
+ LOG_ENTRY_ARGS ("(0x%p, %d, 0x%p, %d)\n", inode, iblock, bh_result,
create);
if (S_ISLNK (inode->i_mode)) {
@@ -1154,7 +1184,7 @@
int status;
void *ioRuns = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, %d)\n", inode, iblock);
+ LOG_ENTRY_ARGS ("(0x%p, %d)\n", inode, iblock);
if (!inode || !inode_data_is_oin (inode)) {
LOG_ERROR_STR ("bad inode or inode has no oin");
@@ -1198,8 +1228,9 @@
int status;
__u64 newsize;
ocfs_lock_res *lockres = NULL;
+ struct super_block *sb = inode->i_sb;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, '%*s')\n", filp, buf, count,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", filp, buf, count,
filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
/* happy write of zero bytes */
@@ -1241,9 +1272,6 @@
/* anything special for o_direct? */
LOG_TRACE_STR ("O_DIRECT");
} else {
- ocfs_down_sem (&(oin->main_res), true);
- acquired = true;
-
LOG_TRACE_ARGS ("non O_DIRECT write, fileopencount=%d\n",
oin->open_hndl_cnt);
if (oin->open_hndl_cnt > 1) {
@@ -1263,6 +1291,8 @@
if (OIN_NEEDS_VERIFICATION (oin)) {
LOG_TRACE_STR ("OIN_NEEDS_VERIFICATION");
+ ocfs_down_sem (&(oin->main_res), true);
+ acquired = true;
status = ocfs_verify_update_oin (osb, oin);
if (status < 0) {
LOG_TRACE_STR ("ocfs_verify_update_oin failed");
@@ -1270,7 +1300,12 @@
ret = -EIO;
goto bail;
}
+ if (acquired) {
+ ocfs_up_sem (&(oin->main_res));
+ acquired = false;
+ }
}
+
if (filp->f_flags & O_APPEND)
newsize = count + inode->i_size;
else
@@ -1286,37 +1321,26 @@
HI (inode->i_size), LO (inode->i_size));
if (newsize > oin->alloc_size) {
- LOG_TRACE_ARGS
- ("Will need more allocation: have=%u.%u, need=%u.%u\n",
- HI (oin->alloc_size), LO (oin->alloc_size), HI (newsize),
- LO (newsize));
-
- if (acquired) {
- ocfs_up_sem (&(oin->main_res));
- acquired = false;
- }
-
+ LOG_TRACE_ARGS ("write extend fe=%u.%u (%u.%u + %u.%u = %u.%u)\n",
+ HILO(oin->file_disk_off), HILO(oin->alloc_size),
+ HILO(newsize - oin->alloc_size), HILO(newsize));
status =
ocfs_create_modify_file (osb, oin->parent_dirnode_off, oin,
NULL, newsize, &oin->file_disk_off,
FLAG_FILE_EXTEND, NULL, NULL);
if (status < 0) {
- LOG_ERROR_ARGS
- ("Failed to extend file from %u.%u to %u.%u",
- HI (*ppos), LO (*ppos), HI (newsize),
- LO (newsize));
- ret = -ENOSPC;
+ if (status != -EINTR && status != -ENOSPC) {
+ LOG_ERROR_STATUS (status);
+ ret = -ENOSPC;
+ } else
+ ret = status;
goto bail;
}
- ocfs_down_sem (&(oin->main_res), true);
- acquired = true;
}
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,10)
- if (filp->f_flags & O_DIRECT) {
+ if (filp->f_flags & O_DIRECT)
ret = ocfs_rw_direct (WRITE, filp, (char *) buf, count, ppos);
- } else
-#endif
+ else
ret = generic_file_write (filp, buf, count, ppos);
if (writingAtEOF && ret >= 0) {
@@ -1325,10 +1349,7 @@
LOG_TRACE_STR
("Generic_file_write ok, asking for OIN update now");
inode->i_size = newsize;
- if (acquired) {
- ocfs_up_sem (&(oin->main_res));
- acquired = false;
- }
+ inode->i_blocks = (newsize + sb->s_blocksize) >> sb->s_blocksize_bits;
memset (&attr, 0, sizeof (struct iattr));
attr.ia_valid |= ATTR_SIZE;
attr.ia_size = newsize;
@@ -1338,11 +1359,11 @@
&oin->file_disk_off, FLAG_FILE_UPDATE,
NULL, &attr);
if (status < 0) {
- /*
- * WE NEED TO MAKE SURE THIS ALWAYS WORKS OR
- * WE NEED TO DO MORE HERE!!!!
- */
- LOG_ERROR_STATUS (ret = -EIO);
+ if (status != -EINTR) {
+ LOG_ERROR_STATUS (status);
+ ret = -EIO;
+ } else
+ ret = status;
}
}
@@ -1377,7 +1398,7 @@
struct inode *inode = filp->f_dentry->d_inode;
int status;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, '%*s')\n", filp, buf, count,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", filp, buf, count,
filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
@@ -1392,12 +1413,11 @@
if (filp->f_flags & O_DIRECT) {
/* anything special for o_direct? */
LOG_TRACE_STR ("O_DIRECT");
- } else {
- ocfs_down_sem (&(oin->main_res), true);
- acquired = true;
}
if (OIN_NEEDS_VERIFICATION (oin)) {
+ ocfs_down_sem (&(oin->main_res), true);
+ acquired = true;
status = ocfs_verify_update_oin (osb, oin);
if (status < 0) {
LOG_TRACE_STR ("ocfs_verify_update_oin failed");
@@ -1405,21 +1425,17 @@
ret = -EIO;
goto bail;
}
- }
- if(acquired) {
- ocfs_up_sem (&(oin->main_res));
- acquired = false;
+ if(acquired) {
+ ocfs_up_sem (&(oin->main_res));
+ acquired = false;
+ }
}
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,10)
- if (filp->f_flags & O_DIRECT) {
+ if (filp->f_flags & O_DIRECT)
ret = ocfs_rw_direct (READ, filp, buf, count, ppos);
- } else
-#endif
- {
+ else
ret = generic_file_read (filp, buf, count, ppos);
- }
if (ret == -EINVAL)
LOG_TRACE_STR ("Generic_file_read returned -EINVAL");
@@ -1440,7 +1456,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, %u)\n", file, (page ? page->index : 0));
+ LOG_ENTRY_ARGS ("(0x%p, %u)\n", file, (page ? page->index : 0));
ret = block_read_full_page (page, ocfs_get_block);
@@ -1456,7 +1472,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x)\n", page);
+ LOG_ENTRY_ARGS ("(0x%p)\n", page);
ret = block_write_full_page (page, ocfs_get_block);
@@ -1477,18 +1493,12 @@
#endif
struct kiobuf *iobuf, unsigned long blocknr, int blocksize)
{
- int ret;
-#ifdef SUSE
- struct inode *inode = filp->f_dentry->d_inode;
-#endif
-
- LOG_ENTRY ();
-
- ret = generic_direct_IO (rw, inode, iobuf, blocknr, blocksize,
- ocfs_get_block);
-
- LOG_EXIT_LONG (ret);
- return ret;
+ /* we are not using this function anymore, in fact
+ * we should never get here any more
+ * so let's just BUG(), hint from sct at redhat.com
+ */
+ BUG();
+ return -1;
} /* ocfs_direct_IO */
#endif
@@ -1501,7 +1511,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n", file, page, from, to);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u)\n", file, page, from, to);
ret = block_prepare_write (page, from, to, ocfs_get_block);
@@ -1513,7 +1523,6 @@
#define SECTOR_SIZE (1U << SECTOR_BITS)
#define SECTOR_MASK (SECTOR_SIZE - 1)
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,10)
/*
* ocfs_rw_direct()
*
@@ -1521,7 +1530,12 @@
static ssize_t ocfs_rw_direct (int rw, struct file *filp, char *buf, size_t size,
loff_t * offp)
{
+#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
struct kiobuf *iobuf;
+#else
+ struct kiobuf *iobuf = filp->f_iobuf;
+ int new_iobuf = 0;
+#endif
int err = 0;
unsigned long blocknr, blocks, myiosize;
size_t transferred;
@@ -1658,11 +1672,25 @@
nbhs = (size >> SECTOR_BITS);
if (nbhs > max_sectors)
nbhs = max_sectors;
-
+#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
err = alloc_kiovec_sz (1, &iobuf, &nbhs);
+#else
+ if (test_and_set_bit(0, &filp->f_iobuf_lock)) {
+ /*
+ * A parallel read/write is using the preallocated iobuf
+ * so just run slow and allocate a new one.
+ */
+ err = alloc_kiovec_sz (1, &iobuf, &nbhs);
+ if (err)
+ goto out;
+ new_iobuf = 1;
+ }
+#endif
inuse = true;
+#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
if (err)
goto out;
+#endif
totalioblocks = 0;
while (size > 0) {
if (large_io) {
@@ -1685,11 +1713,19 @@
}
/* get the blocknr depending on io size for all blocks */
/* since we are awlays within the extent we only need to get the first block */
+#ifdef SUSE
+ iobuf->kio_blocks[0] = firstphys + totalioblocks;
+#else
iobuf->blocks[0] = firstphys + totalioblocks;
+#endif
if (large_io) {
blocknr+=8;
+#ifdef SUSE
+ iobuf->kio_blocks[0]=iobuf->kio_blocks[0] / 8;
+#else
iobuf->blocks[0]=iobuf->blocks[0] / 8;
+#endif
} else {
blocknr++;
}
@@ -1700,11 +1736,25 @@
} else {
blocknr++;
}
+#ifdef SUSE
+ iobuf->kio_blocks[i]=iobuf->kio_blocks[0] + i;
+#else
iobuf->blocks[i]=iobuf->blocks[0] + i;
+#endif
}
+#ifdef SUSE
err =
+ brw_kiovec (rw, 1, &iobuf, inode->i_dev, iobuf->kio_blocks,
+ large_io ? 4096 : 512);
+#else
+ err =
brw_kiovec (rw, 1, &iobuf, inode->i_dev, iobuf->blocks,
large_io ? 4096 : 512);
+#endif
+#ifdef SUSE
+ if (rw == READ && err > 0)
+ mark_dirty_kiobuf(iobuf, err);
+#endif
if (err >= 0) {
transferred += err;
size -= err;
@@ -1714,6 +1764,7 @@
printk(
"ocfs_rw_direct : brw_kiovec() %d\n",
err);
+ unmap_kiobuf(iobuf);
break;
}
@@ -1727,7 +1778,14 @@
printk("need to fail out\n");
break;
}
+#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
free_kiovec_sz(1, &iobuf, &nbhs);
+#else
+ if (!new_iobuf)
+ clear_bit(0, &filp->f_iobuf_lock);
+ else
+ free_kiovec_sz(1, &iobuf, &nbhs);
+#endif
inuse = false;
totalioblocks = 0;
firstlogic = nextlogic;
@@ -1739,11 +1797,19 @@
}
out:
+#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
if (inuse)
free_kiovec_sz (1, &iobuf, &nbhs);
+#else
+ if (inuse) {
+ if (!new_iobuf)
+ clear_bit(0, &filp->f_iobuf_lock);
+ else
+ free_kiovec_sz(1, &iobuf, &nbhs);
+ }
+#endif
return err;
} /* ocfs_rw_direct */
-#endif /* LINUX_VERSION_CODE < LinuxVersionCode(2,4,10) */
#ifdef AIO_ENABLED
static int ocfs_kvec_rw(struct file *filp, int rw, kvec_cb_t cb, size_t size, loff_t pos);
@@ -1825,7 +1891,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n", file, page, from, to);
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, %u)\n", file, page, from, to);
ret = generic_commit_write (file, page, from, to);
@@ -1949,13 +2015,13 @@
}
if (status < 0) {
- if (status != -ENOENT) {
+ if (status != -ENOENT && status != -EINTR) {
LOG_ERROR_STATUS (status);
goto leave;
}
}
} else if (!create) {
- LOG_ERROR_STR
+ LOG_TRACE_STR
("Open request made for nonexistent file!");
status = -ENOENT;
goto leave;
@@ -2023,6 +2089,7 @@
ocfs_release_file_entry (tempFileEnt);
if (status < 0) {
+ if (status != -EINTR)
LOG_ERROR_STATUS (status);
goto leave;
}
@@ -2054,13 +2121,20 @@
goto leave;
}
- ocfs_initialize_oin (OFile->oin, osb,
+ status = ocfs_initialize_oin (OFile->oin, osb,
OCFS_OIN_CACHE_UPDATE | (S_ISDIR (mode) ?
OCFS_OIN_DIRECTORY :
0), NewFileObject,
fileEntry,
S_ISDIR (mode) ? fe->extents[0].
disk_off : fileEntry);
+ if (status < 0) {
+ if (status != -EINTR)
+ LOG_ERROR_STATUS (status);
+ ocfs_release_ofile (OFile);
+ ocfs_release_oin (OFile->oin, true);
+ goto leave;
+ }
if (ParentOin)
OCFS_CLEAR_FLAG (ParentOin->oin_flags, OCFS_OIN_IN_USE);
@@ -2105,24 +2179,14 @@
/* of how many concurrent openers at this point */
/* so take the oin->main_res so we won't need the i_sem */
-
+ up(&inode->i_sem);
+
oin_sem = &(oin->main_res);
+ if (!bAcquiredOIN) {
+ ocfs_down_sem (oin_sem, true);
+ bAcquiredOIN = true;
+ }
- if (!ocfs_down_sem (oin_sem, false)) {
- // eek! we cannot sit around and wait for main_res while we're holding i_sem
- bAcquiredOIN = false;
- } else {
- bAcquiredOIN = true;
- }
- up(&inode->i_sem);
-
- /* is this still a race!?!? */
- if (!bAcquiredOIN) {
- oin_sem = &(oin->main_res);
- ocfs_down_sem (oin_sem, true);
- bAcquiredOIN = true;
- }
-
if (oin->oin_flags & OCFS_OIN_DELETE_ON_CLOSE) {
LOG_TRACE_STR
("oin has DELETE_ON_CLOSE set, returning DELETE_PENDING");
@@ -2166,11 +2230,18 @@
}
status = 0;
} else {
- ocfs_delete_all_extent_maps (oin);
+ ocfs_extent_map_destroy (&oin->map);
+ ocfs_extent_map_init (&oin->map);
+// ocfs_delete_all_extent_maps (oin);
if (mode & O_DIRECT)
OCFS_SET_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
- else
+ else {
OCFS_CLEAR_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
+ fsync_inode_buffers(inode);
+ if (inode->i_data.nrpages)
+ truncate_inode_pages(&inode->i_data, 0);
+
+ }
}
/* Allocate a new OFile */
@@ -2254,30 +2325,20 @@
int status;
int ret, err = 0;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", inode, file,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", inode, file,
file->f_dentry->d_name.len, file->f_dentry->d_name.name);
atomic_inc (&parent->i_count);
status = ocfs_create_or_open_file (inode, parent, dentry, file->f_flags,
&ofile, NODEV);
if (status < 0) {
- if (status == -ENOENT) {
- LOG_ERROR_STR ("File not found while opening file");
- ret = -ENOENT;
- goto bail;
- } else if (status == -ENOMEM) {
- LOG_ERROR_STR ("Out of memory while opening file");
- ret = -ENOMEM;
- goto bail;
- } else if (status == -EACCES) {
- LOG_ERROR_STR ("Access denied while opening file");
- ret = -EACCES;
- goto bail;
- } else {
+ if (status != -ENOENT && status != -ENOMEM &&
+ status != -EACCES && status != -EINTR) {
LOG_ERROR_STATUS (status);
ret = -EACCES;
- goto bail;
- }
+ } else
+ ret = status;
+ goto bail;
}
file->private_data = (void *) ofile;
@@ -2306,7 +2367,7 @@
ocfs_file *newofile = NULL;
int error = -EACCES;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, %d, '%*s')", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %d, '%*s')", dir, dentry, mode,
dev, dentry->d_name.len, dentry->d_name.name);
atomic_inc (&dir->i_count);
@@ -2346,6 +2407,8 @@
} else if (status == -ENOSPC) {
LOG_ERROR_STR ("Disk is full");
error = -ENOSPC;
+ } else if (status == -EINTR) {
+ error = -EINTR;
} else {
LOG_ERROR_STATUS (status);
}
@@ -2369,7 +2432,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFDIR, NODEV);
@@ -2386,7 +2449,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFREG, NODEV);
@@ -2406,7 +2469,7 @@
ocfs_file_entry *fe;
struct inode *inode;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x, old='%*s' new='%*s')\n", old_dentry, dir, dentry,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, old='%*s' new='%*s')\n", old_dentry, dir, dentry,
old_dentry->d_name.len, old_dentry->d_name.name,
dentry->d_name.len, dentry->d_name.name);
@@ -2449,7 +2512,7 @@
{
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n", dentry,
+ LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
ret = dentry->d_inode && !d_unhashed (dentry);
@@ -2467,7 +2530,7 @@
struct list_head *list;
int ret;
- LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n", dentry,
+ LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
spin_lock (&dcache_lock);
@@ -2505,7 +2568,7 @@
ocfs_lock_res *lockres;
ocfs_super *osb = NULL;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", dir, dentry,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
@@ -2519,14 +2582,12 @@
if (ocfs_empty (dentry)) {
status = ocfs_set_disposition_information (dir, dentry);
if (status < 0) {
-
if (status != -ENOTEMPTY && status != -EPERM &&
- status != -EBUSY) {
- LOG_ERROR_STR ("ocfs_set_disposition_information failed!");
- } else {
- status = -EBUSY;
- LOG_TRACE_STR ("ocfs_set_disposition_information failed!");
- }
+ status != -EBUSY && status != -EINTR) {
+ LOG_ERROR_STATUS (status);
+ retval = -EBUSY;
+ } else
+ retval = status;
goto bail;
}
@@ -2547,7 +2608,7 @@
ocfs_remove_sector_node (osb, lockres);
ocfs_put_lockres (lockres);
} else
- LOG_TRACE_STR ("lookup sectornode failed\n");
+ LOG_TRACE_STR ("lookup sectornode failed");
}
}
@@ -2577,7 +2638,7 @@
struct inode *new_inode = new_dentry->d_inode;
int error = 0;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x, 0x%08x, from='%*s' to='%*s')\n",
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, 0x%p, from='%*s' to='%*s')\n",
old_dir, old_dentry, new_dir, new_dentry,
old_dentry->d_name.len, old_dentry->d_name.name,
new_dentry->d_name.len, new_dentry->d_name.name);
@@ -2585,17 +2646,12 @@
if (atomic_read (&old_inode->i_count) > 1) {
error = -EBUSY;
goto bail;
- } else if (atomic_read (&old_dentry->d_count) > 1) {
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
+ } else if (atomic_read (&old_dentry->d_count) > 2) {
shrink_dcache_parent (old_dentry);
- if (atomic_read (&old_dentry->d_count) > 1) {
+ if (atomic_read (&old_dentry->d_count) > 2) {
error = -EBUSY;
goto bail;
}
-#else
- error = -EBUSY;
- goto bail;
-#endif
}
if (new_inode) {
@@ -2608,8 +2664,11 @@
status = ocfs_set_rename_information (old_dir, old_dentry, new_dir,
new_dentry);
if (status < 0) {
- error = -ENOENT;
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR && status != -ENOENT) {
+ LOG_ERROR_STATUS (status);
+ error = -ENOENT;
+ } else
+ error = status;
goto bail;
}
old_inode->i_nlink++;
@@ -2627,8 +2686,11 @@
status = ocfs_set_rename_information (old_dir, old_dentry, new_dir,
new_dentry);
if (status < 0) {
- error = -ENOENT;
- LOG_ERROR_STATUS (status);
+ if (status != -EINTR && status != -ENOENT) {
+ LOG_ERROR_STATUS (status);
+ error = -ENOENT;
+ } else
+ error = status;
goto bail;
}
old_inode->i_nlink++;
@@ -2663,8 +2725,9 @@
__u64 fileOff, parentOff;
__u64 newsize;
int status;
+ struct super_block *sb;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, symname='%s' actual='%*s')\n", dir, dentry, symname,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, symname='%s' actual='%*s')\n", dir, dentry, symname,
dentry->d_name.len, dentry->d_name.name);
atomic_inc (&dir->i_count);
@@ -2674,14 +2737,8 @@
goto bail;
}
parentInode = dentry->d_parent->d_inode;
+ sb = parentInode->i_sb;
- if (!dentry->d_parent || !dentry->d_parent->d_inode) {
- LOG_ERROR_STR ("failed to get parent inode!");
- error = -EIO;
- goto bail;
- }
- parentInode = dentry->d_parent->d_inode;
-
error = ocfs_mknod (dir, dentry, S_IFLNK | S_IRWXUGO, NODEV);
if (!error) {
int l = strlen (symname) + 1;
@@ -2720,18 +2777,23 @@
&fileOff, FLAG_FILE_EXTEND, NULL, NULL);
if (status < 0) {
- LOG_ERROR_ARGS ("Failed to extend file to %u.%u !!!",
- HI (newsize), LO (newsize));
- error = -ENOSPC;
+ if (status != -EINTR && status != -ENOSPC) {
+ LOG_ERROR_STATUS (status);
+ error = -ENOSPC;
+ } else
+ error = status;
goto bail;
}
if (oin != NULL) {
ocfs_down_sem (&(oin->main_res), true);
inode->i_size = newsize;
+ inode->i_blocks = (newsize + sb->s_blocksize) >> sb->s_blocksize_bits;
ocfs_up_sem (&(oin->main_res));
}
error = ocfs_block_symlink (inode, symname, l);
+ if (error < 0)
+ LOG_ERROR_STATUS (error);
}
bail:
@@ -2753,7 +2815,7 @@
struct dentry *dentry;
struct inode *parent;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", inode, file,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", inode, file,
file->f_dentry->d_name.len, file->f_dentry->d_name.name);
dentry = file->f_dentry;
@@ -2808,9 +2870,12 @@
/* for the inode, but here I just check this one becuz I'm lz */
/* no hard links yet so who cares */
if (!atomic_read(&dentry->d_count)) {
- if (oin->oin_flags & OCFS_OIN_OPEN_FOR_DIRECTIO) {
+ if (oin->oin_flags & OCFS_OIN_OPEN_FOR_DIRECTIO) {
+ fsync_inode_buffers(inode);
+ if (inode->i_data.nrpages)
+ truncate_inode_pages(&inode->i_data, 0);
OCFS_CLEAR_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
- }
+ }
if (oin->oin_flags & OCFS_OIN_NEEDS_DELETION ||
oin->oin_flags & OCFS_OIN_IN_USE) {
ocfs_up_sem (&(oin->main_res));
@@ -2842,7 +2907,7 @@
*/
static int ocfs_flush (struct file *file)
{
- LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n", file,
+ LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", file,
file->f_dentry->d_name.len, file->f_dentry->d_name.name);
fsync_inode_buffers(file->f_dentry->d_inode);
@@ -2856,7 +2921,7 @@
*/
static int ocfs_sync_file (struct file *file, struct dentry *dentry, int datasync)
{
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %d, '%*s')\n", file, dentry, datasync,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", file, dentry, datasync,
dentry->d_name.len, dentry->d_name.name);
fsync_inode_buffers(dentry->d_inode);
LOG_EXIT_LONG (0);
@@ -2869,7 +2934,7 @@
*/
static void ocfs_put_super (struct super_block *sb)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", sb);
+ LOG_ENTRY_ARGS ("(0x%p)\n", sb);
fsync_no_super (sb->s_dev);
LOG_TRACE_STR ("put super... do nothing! DONE!!!!");
@@ -2895,7 +2960,7 @@
__u64 rootOff;
int ret = 0;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", filp, dirent,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", filp, dirent,
filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
if (!filp ||
@@ -3006,12 +3071,14 @@
*/
static void ocfs_put_inode (struct inode *inode)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", inode);
+ LOG_ENTRY_ARGS ("(0x%p)\n", inode);
LOG_TRACE_ARGS ("put_inode: count=%d\n", inode->i_count);
if (inode_data_is_oin(inode) && (atomic_read (&inode->i_count) == 1) ) {
ocfs_inode *oin;
oin = ((ocfs_inode *)inode->u.generic_ip);
- ocfs_delete_all_extent_maps (oin);
+ ocfs_extent_map_destroy (&oin->map);
+ ocfs_extent_map_init (&oin->map);
+// ocfs_delete_all_extent_maps (oin);
}
LOG_EXIT ();
return;
@@ -3023,7 +3090,7 @@
*/
static void ocfs_clear_inode (struct inode *inode)
{
- LOG_ENTRY_ARGS ("(ino=0x%08x)\n", inode);
+ LOG_ENTRY_ARGS ("(ino=0x%p)\n", inode);
if (inode) {
if (inode_data_is_oin (inode)) {
@@ -3053,7 +3120,9 @@
ocfs_release_ofile (ofile);
}
- ocfs_delete_all_extent_maps (oin);
+ ocfs_extent_map_destroy (&oin->map);
+ ocfs_extent_map_init (&oin->map);
+// ocfs_delete_all_extent_maps (oin);
ocfs_release_cached_oin (osb, oin);
ocfs_release_oin (oin, true);
@@ -3123,8 +3192,9 @@
ocfs_super *osb = NULL;
__u64 parentOff, fileOff;
ocfs_file_entry *fe=NULL;
+ struct super_block *sb = inode->i_sb;
- LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n", dentry,
+ LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
@@ -3202,9 +3272,11 @@
flags, NULL, NULL);
if (status < 0) {
- LOG_TRACE_ARGS ("Failed to extend file to %u.%u !!!\n",
- HI (newsize), LO (newsize));
+ if (status != -EINTR && status != -ENOSPC) {
+ LOG_ERROR_STATUS (status);
error = -ENOSPC;
+ } else
+ error = status;
goto bail;
}
@@ -3212,10 +3284,12 @@
ocfs_down_sem (&(oin->main_res), true);
#ifdef RECLAIM_SPACE_ON_TRUNCATE
if (flags==FLAG_FILE_TRUNCATE) {
- ocfs_delete_all_extent_maps(oin);
+ ocfs_extent_map_destroy (&oin->map);
+ ocfs_extent_map_init (&oin->map);
}
#endif
inode->i_size = newsize;
+ inode->i_blocks = (newsize + sb->s_blocksize) >> sb->s_blocksize_bits;
ocfs_up_sem (&(oin->main_res));
}
}
@@ -3230,8 +3304,11 @@
ocfs_create_modify_file (osb, parentOff, NULL, NULL, newsize,
&fileOff, FLAG_FILE_UPDATE, NULL, attr);
if (status < 0) {
+ if (status != -EINTR) {
LOG_ERROR_STATUS (status);
error = -EIO;
+ } else
+ error = status;
goto bail;
}
@@ -3256,7 +3333,7 @@
struct super_block *sb = dentry->d_inode->i_sb;
int status;
- LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n", dentry, attr,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dentry, attr,
dentry->d_name.len, dentry->d_name.name);
inode = dentry->d_inode;
@@ -3266,9 +3343,11 @@
if (oin == ((ocfs_super *)(sb->u.generic_sbp))->oin_root_dir)
goto bail;
if (oin != NULL) {
+ ocfs_down_sem (&(oin->main_res), true);
status = ocfs_verify_update_oin (oin->osb, oin);
if (status < 0)
LOG_ERROR_STATUS (status);
+ ocfs_up_sem (&(oin->main_res));
}
bail:
@@ -3283,6 +3362,7 @@
static int ocfs_dentry_revalidate (struct dentry *dentry, int flags)
{
int ret = 0; /* if all else fails, just return false */
+ int tmpstat = 0;
ocfs_file_entry *fe = NULL;
struct inode *inode;
ocfs_inode *oin;
@@ -3291,7 +3371,7 @@
ocfs_find_inode_args args;
struct qstr q;
- LOG_ENTRY_ARGS ("(0x%08x, %d, '%*s')\n", dentry, flags,
+ LOG_ENTRY_ARGS ("(0x%p, %d, '%*s')\n", dentry, flags,
dentry->d_name.len, dentry->d_name.name);
if ((inode = dentry->d_inode) == NULL ||
@@ -3323,8 +3403,10 @@
/* TODO: optimize */
ocfs_down_sem (&(oin->main_res), true);
oin->needs_verification = true;
+ tmpstat = ocfs_verify_update_oin(osb, oin);
+ if (tmpstat < 0)
+ LOG_ERROR_STATUS (tmpstat);
ocfs_up_sem (&(oin->main_res));
- UPDATE_OIN (oin);
goto bail;
}
@@ -3382,7 +3464,7 @@
ocfs_inode *oin;
int status;
- LOG_ENTRY_ARGS ("(0x%08x)\n", dentry);
+ LOG_ENTRY_ARGS ("(0x%p)\n", dentry);
ret = 0;
inode = dentry->d_inode;
@@ -3417,7 +3499,6 @@
{
bool bAcquiredOIN = false;
ocfs_lock_res *lockResource = NULL;
- static spinlock_t lamelock = SPIN_LOCK_UNLOCKED;
ocfs_lock_res *val=NULL;
struct dentry *dentry;
struct list_head *iter;
@@ -3427,9 +3508,8 @@
int status = 0;
- LOG_ENTRY_ARGS ("(oin = 0x%08x)\n", oin);
+ LOG_ENTRY_ARGS ("(oin = 0x%p)\n", oin);
- spin_lock (&lamelock); /* TODO: figure out if this helps ;-) */
if (oin == NULL)
goto bail;
@@ -3486,7 +3566,7 @@
if (val == lockResource)
ocfs_remove_sector_node (osb, val);
else
- LOG_ERROR_ARGS("(lres=0x%08x) != (val=0x%08x)",
+ LOG_ERROR_ARGS("(lres=0x%p) != (val=0x%p)",
lockResource, val);
ocfs_put_lockres (val);
} else {
@@ -3496,7 +3576,7 @@
LOG_TRACE_ARGS ("hashtable already destroyed\n");
goto bail;
}
- LOG_ERROR_ARGS("lres=0x%08x is not in the hash!",
+ LOG_ERROR_ARGS("lres=0x%p is not in the hash!",
lockResource);
}
ocfs_put_lockres (oin->lock_res);
@@ -3505,7 +3585,6 @@
bail:
ocfs_put_lockres (lockResource);
- spin_unlock (&lamelock);
LOG_EXIT ();
return;
} /* ocfs_release_cached_oin */
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsmount.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsmount.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsmount.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -36,7 +36,7 @@
extern __u32 osb_id; /* Keeps track of next available OSB Id */
extern spinlock_t mount_cnt_lock;
extern __u32 mount_cnt; /* Count of mounted volumes */
-//static int errno;
+extern bool mount_cnt_inc; /* true when mount_cnt is inc by 1 during first mount */
/*
* ocfs_read_disk_header()
@@ -272,11 +272,16 @@
/* Start the ipcdlm */
ocfs_init_ipc_dlm (OCFS_UDP);
OcfsIpcCtxt.init = true;
+ if (mount_cnt_inc == false) {
+ MOD_INC_USE_COUNT;
+ mount_cnt_inc = true;
+ }
}
spin_unlock (&mount_cnt_lock);
/* wait for nm thread to be init */
- ocfs_wait (osb->nm_init_event, atomic_read (&osb->nm_init), 0);
+ ocfs_wait (osb->nm_init_event,
+ (atomic_read (&osb->nm_init) >= OCFS_HEARTBEAT_INIT ), 0);
/* Join or Form the cluster... */
LOG_TRACE_STR ("ocfs_vol_member_reconfig...");
@@ -334,7 +339,7 @@
__u32 tempmap;
int i;
- LOG_ENTRY_ARGS ("(0x%08x)\n", sb);
+ LOG_ENTRY_ARGS ("(0x%p)\n", sb);
if (sb == NULL || sb->u.generic_sbp == NULL) {
LOG_ERROR_STATUS (status = -EFAIL);
@@ -358,7 +363,7 @@
goto leave;
}
#endif
- LOG_TRACE_ARGS ("osb=0x%08x rootoin=0x%08x offset=%u.%u\n", osb,
+ LOG_TRACE_ARGS ("osb=0x%p rootoin=0x%p offset=%u.%u\n", osb,
rootoin, rootoin->file_disk_off);
fsync_no_super (sb->s_dev);
@@ -418,6 +423,10 @@
AcquiredOSB = false;
}
+ printk ("ocfs: Unmounting device (%u,%u) on %s (node %d)\n",
+ MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev),
+ osb->node_cfg_info[osb->node_num]->node_name, osb->node_num);
+
/* Free all nodecfgs */
for (i = 0; i < OCFS_MAXIMUM_NODES; ++i) {
ocfs_node_config_info *p;
@@ -430,6 +439,14 @@
ocfs_safefree (osb);
sb->s_dev = 0;
+ spin_lock (&mount_cnt_lock);
+ if (mount_cnt == 0 && atomic_read (&OcfsGlobalCtxt.cnt_lockres) == 0 &&
+ mount_cnt_inc == true) {
+ MOD_DEC_USE_COUNT;
+ mount_cnt_inc = false;
+ }
+ spin_unlock (&mount_cnt_lock);
+
leave:
if (AcquiredOSB) {
ocfs_up_sem (&(osb->osb_res));
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsport.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsport.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsport.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -44,7 +44,7 @@
*/
void ocfs_init_sem (ocfs_sem * res)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", res);
+ LOG_ENTRY_ARGS ("(0x%p)\n", res);
memset (res, 0, sizeof (ocfs_sem));
init_MUTEX (&(res->sem));
@@ -68,7 +68,7 @@
{
bool ret = true;
- LOG_ENTRY_ARGS ("(0x%08x, %u)\n", res, wait);
+ LOG_ENTRY_ARGS ("(0x%p, %u)\n", res, wait);
if (res->magic != OCFS_SEM_MAGIC) {
ret = false;
@@ -119,7 +119,7 @@
*/
void ocfs_up_sem (ocfs_sem * res)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", res);
+ LOG_ENTRY_ARGS ("(0x%p)\n", res);
if (res->magic != OCFS_SEM_MAGIC)
goto bail;
@@ -142,7 +142,7 @@
*/
int ocfs_del_sem (ocfs_sem * res)
{
- LOG_ENTRY_ARGS ("(0x%08x)\n", res);
+ LOG_ENTRY_ARGS ("(0x%p)\n", res);
res->magic = OCFS_SEM_DELETED;
@@ -169,11 +169,19 @@
}
/* Block all signals except SIGKILL, SIGSTOP, SIGHUP and SIGINT */
+#ifdef HAVE_NPTL
+ spin_lock_irq (¤t->sighand->siglock);
+ tmpsig = current->blocked;
+ siginitsetinv (¤t->blocked, SHUTDOWN_SIGS);
+ recalc_sigpending ();
+ spin_unlock_irq (¤t->sighand->siglock);
+#else
spin_lock_irq (¤t->sigmask_lock);
tmpsig = current->blocked;
siginitsetinv (¤t->blocked, SHUTDOWN_SIGS);
recalc_sigpending (current);
spin_unlock_irq (¤t->sigmask_lock);
+#endif
return;
} /* ocfs_daemonize */
@@ -451,11 +459,12 @@
/* prefetch has been declared to allow to build in debug mode */
#ifdef DEBUG
#ifndef ARCH_HAS_PREFETCH
-inline void prefetch (const void *x)
-{;
-}
+inline void prefetch (const void *x) {;}
#endif
+#ifndef ARCH_HAS_PREFETCHW
+inline void prefetchw(const void *x) {;}
#endif
+#endif
#endif /* !USERSPACE_TOOL */
@@ -492,7 +501,9 @@
{
LOG_ENTRY ();
- OCFS_ASSERT (map != NULL);
+ if (!map)
+ goto leave;
+
if (map->initialized) {
spin_lock(&(map->lock));
#warning RACE! need to retest map->initialized here!
@@ -503,6 +514,7 @@
spin_unlock(&(map->lock));
}
+leave:
LOG_EXIT ();
return;
} /* ocfs_extent_map_destroy */
Modified: branches/ocfs-1.0/ocfs2/Linux/ocfsproc.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Linux/ocfsproc.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Linux/ocfsproc.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -117,71 +117,90 @@
static int ocfs_proc_memallocs (char *page, char **start, off_t off,
int count, int *eof, void *data)
{
- int ret, proc_overflow=0;
+ int ret = 0;
+ int proc_overflow = 0;
struct list_head *iter;
struct list_head *temp_iter;
alloc_item *item;
int len = 0;
char *slabname;
+ char *tmpstr = NULL;
LOG_ENTRY ();
- ret = sprintf ((char *) (page + len), "%8s %10s %30s\n",
- "Pointer", "Size/Slab", "Line:File");
- printk("%8s %10s %30s\n", "Pointer", "Size/Slab", "Line:File");
+#define MEMDBG_LEN 255
+ tmpstr = ocfs_malloc(MEMDBG_LEN);
+ if (!tmpstr) {
+ LOG_ERROR_STATUS (-ENOMEM);
+ goto bail;
+ }
+
+ sprintf (tmpstr, "%-8s %-9s %s\n", "Pointer", "Size/Slab", "Line:File");
+ printk("%s", tmpstr);
+ ret = sprintf ((char *) (page + len), "%s", tmpstr);
len += ret;
list_for_each_safe (iter, temp_iter, &OcfsGlobalCtxt.item_list) {
- if (len >= 4096) {
+ if (len >= 4096)
proc_overflow = 1;
- LOG_ERROR_STR ("proc file truncated!");
- }
item = list_entry (iter, alloc_item, list);
- switch (item->type)
- {
- case SLAB_ITEM:
- if (item->u.slab==OcfsGlobalCtxt.oin_cache)
- slabname="oin";
- else if (item->u.slab==OcfsGlobalCtxt.ofile_cache)
- slabname="ofile";
- else if (item->u.slab==OcfsGlobalCtxt.lockres_cache)
- slabname="lockres";
- else if (item->u.slab==OcfsGlobalCtxt.fe_cache)
- slabname="fe";
- else
- slabname="unknown";
- if (!proc_overflow)
- ret = snprintf ((char *) (page + len), (4096 - len),
- "%08x %8s %s\n", item->address, slabname, item->tag);
-#ifdef OCFS_DBG_LOCKRES
- if (item->u.slab==OcfsGlobalCtxt.lockres_cache) {
+ switch (item->type) {
+ case SLAB_ITEM:
+ if (item->u.slab == OcfsGlobalCtxt.oin_cache)
+ slabname = "oin";
+ else if (item->u.slab == OcfsGlobalCtxt.ofile_cache)
+ slabname = "ofile";
+ else if (item->u.slab == OcfsGlobalCtxt.lockres_cache)
+ slabname = "lockres";
+ else if (item->u.slab == OcfsGlobalCtxt.fe_cache)
+ slabname = "fe";
+ else
+ slabname = "unknown";
+
+ if (item->u.slab == OcfsGlobalCtxt.lockres_cache) {
ocfs_lock_res *p = item->address;
- printk("%08x %8s %d\n", item->address,
- slabname, atomic_read(&p->lr_ref_cnt));
+ sprintf(tmpstr,
+ "%08x %9s %-40s %5d %u.%u\n",
+ item->address, slabname, item->tag,
+ atomic_read(&p->lr_ref_cnt),
+ HILO(p->sector_num));
+ } else
+ sprintf(tmpstr, "%08x %9s %-40s\n", item->address,
+ slabname, item->tag);
+
+ printk("%s", tmpstr);
+ if (!proc_overflow) {
+ ret = snprintf ((char *) (page + len),
+ (4096 - len), "%s", tmpstr);
+ len += ret;
}
-#else
- printk("%08x %8s %s\n", item->address, slabname, item->tag);
-#endif
- break;
- case KMALLOC_ITEM:
- case VMALLOC_ITEM:
+ break;
+ case KMALLOC_ITEM:
+ case VMALLOC_ITEM:
default:
- if (!proc_overflow)
- ret = snprintf ((char *) (page + len), (4096 - len),
- "%08x %8d %s\n", item->address, item->u.length, item->tag);
- printk("%08x %8d %s\n", item->address, item->u.length, item->tag);
- break;
- }
- if (ret < 0) {
- LOG_ERROR_STR ("uh oh failed to sprintf!");
+ sprintf(tmpstr, "%08x %9d %s\n", item->address,
+ item->u.length, item->tag);
+ printk("%s", tmpstr);
+ if (!proc_overflow) {
+ ret = snprintf ((char *) (page + len),
+ (4096 - len), "%s", tmpstr);
+ len += ret;
+ }
+
+ break;
+ }
+ if (ret < 0)
proc_overflow = 1;
- }
- if (!proc_overflow)
- len += ret;
}
+
+ if (proc_overflow)
+ LOG_ERROR_STR ("proc output truncated");
+
ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+bail:
+ ocfs_safefree (tmpstr);
LOG_EXIT_LONG (ret);
return ret;
} /* ocfs_proc_memallocs */
Modified: branches/ocfs-1.0/ocfs2/Makefile
===================================================================
--- branches/ocfs-1.0/ocfs2/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -22,6 +22,10 @@
DEFINES += -DENABLE_WAIT_FOR_LOCK_RELEASE
DEFINES += -DSYSFILE_EXTMAP_FIX
+ifdef OCFS_AIO
+DEFINES += -DAIO_ENABLED
+endif
+
ifdef OCFS_DEBUG
DEFINES += -DDEBUG
endif
@@ -35,24 +39,28 @@
DEFINES += -DTRACE
endif
+ifdef HAVE_NPTL
+DEFINES += -DHAVE_NPTL
+endif
+
ifeq ($(KVER),vmware)
KERNELINC = /usr/src/linux-2.4/include
endif
+ifeq ($(KVER),suse)
+DEFINES += -DSUSE
+endif
ifeq ($(KVER),smp)
- DEFINES += -D__MODULE_KERNEL_i686=1
DEFINES += -D__BOOT_KERNEL_ENTERPRISE=0
DEFINES += -D__BOOT_KERNEL_SMP=1
DEFINES += -D__BOOT_KERNEL_UP=0
endif
ifeq ($(KVER),ent)
- DEFINES += -D__MODULE_KERNEL_i686=1
DEFINES += -D__BOOT_KERNEL_ENTERPRISE=1
DEFINES += -D__BOOT_KERNEL_SMP=0
DEFINES += -D__BOOT_KERNEL_UP=0
endif
ifeq ($(KVER),up)
- DEFINES += -D__MODULE_KERNEL_i686=1
DEFINES += -D__BOOT_KERNEL_ENTERPRISE=0
DEFINES += -D__BOOT_KERNEL_SMP=0
DEFINES += -D__BOOT_KERNEL_UP=1
@@ -60,17 +68,26 @@
INCLUDES = -ICommon/inc -ILinux/inc -I$(KERNELINC) -I$(GCCINC)
-CFLAGS=$(OPTS) -nostdinc -fomit-frame-pointer $(MODVERSIONS) $(WARNINGS)
+CFLAGS=$(OPTS) -nostdinc -fno-strict-aliasing -fno-common -fomit-frame-pointer \
+ $(MODVERSIONS) $(WARNINGS)
LDADD=-nostdlib
ifeq ($(OCFS_PROCESSOR),x86_64)
- DEFINES += -Dx86_64
- DEFINES += -DSUSE -D__OPTIMIZE__
+ DEFINES += -D__OPTIMIZE__
CFLAGS += -mcmodel=kernel
+ CFLAGS += -O0 -m64
+endif
+ifeq ($(OCFS_PROCESSOR),ia64)
+ DEFINES += -D__OPTIMIZE__
CFLAGS += -O0
-else
+endif
+ifeq ($(OCFS_PROCESSOR),i686)
+ DEFINES += -D__ILP32__
CFLAGS += -O2
endif
+ifeq ($(OCFS_PROCESSOR),i586)
+ CFLAGS += -O2
+endif
MODULES = ocfs.o
@@ -103,9 +120,16 @@
ifeq ($(OCFS_PROCESSOR),x86_64)
SUPPORT =
-else
+endif
+ifeq ($(OCFS_PROCESSOR),ia64)
+ SUPPORT =
+endif
+ifeq ($(OCFS_PROCESSOR),i686)
SUPPORT = Support/divdi3.c
endif
+ifeq ($(OCFS_PROCESSOR),i586)
+ SUPPORT = Support/divdi3.c
+endif
CFILES = $(CPARTNER) $(CALONE) $(SUPPORT)
Modified: branches/ocfs-1.0/ocfs2/Support/divdi3.c
===================================================================
--- branches/ocfs-1.0/ocfs2/Support/divdi3.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/ocfs2/Support/divdi3.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -86,8 +86,7 @@
#ifdef __i386__
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
- __asm__ ("subl %5,%1
- sbbl %3,%0" \
+ __asm__ ("subl %5,%1\n\tsbbl %3,%0" \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \
Modified: branches/ocfs-1.0/redhat/Makefile
===================================================================
--- branches/ocfs-1.0/redhat/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/redhat/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -2,6 +2,6 @@
include $(TOPDIR)/Preamble.make
-DIST_FILES = ocfs.init ocfs-2.4.9-e.spec.in
+DIST_FILES = ocfs.init ocfs-2.4.9-e.spec.in ocfs-2.4.18-e.spec.in
include $(TOPDIR)/Postamble.make
Added: branches/ocfs-1.0/redhat/ocfs-2.4.18-e.spec.in
===================================================================
--- branches/ocfs-1.0/redhat/ocfs-2.4.18-e.spec.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/redhat/ocfs-2.4.18-e.spec.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,238 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+# Turn on's and off's (summit and debug not used but added
+# for future proofing)
+%define chicks 1
+%define buildup 1
+%define buildsmp 1
+%define buildenterprise 0
+%define buildsummit 0
+%define builddebug 0
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define base 2.4.18-e
+%define kver %{base}.37
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{base}
+Version: @DIST_VERSION@
+Release: @RPM_VERSION@
+Copyright: GPL
+Group: System Environment/Kernel
+Source: ocfs- at DIST_VERSION@.tar.gz
+URL: http://ocfs.otncast.otnxchange.oracle.com/servlets/ProjectHome
+Distribution: Oracle
+Vendor: Oracle Corporation
+Packager: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: kernel >= %{kver}
+Requires: ocfs-support >= 1.0.9
+BuildRequires: kernel-source >= %{kver}
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem. This package is compiled for
+uniprocessor kernels.
+
+%if %{buildsmp}
+%package smp
+Summary: The Oracle Cluster Filesystem for SMP systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-smp >= %{kver}
+Requires: ocfs-support >= 1.0.9
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description smp
+OCFS is the Oracle Cluster Filesystem. This package is compiled for
+symmetric multiprocessor kernels.
+%endif
+
+
+%if %{builddebug}
+%package debug
+Summary: The Oracle Cluster Filesystem for debugging systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-debug >= %{kver}
+Requires: ocfs-support >= 1.0.9
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description debug
+OCFS is the Oracle Cluster Filesystem. This package is compiled for
+debugging kernels.
+%endif
+
+
+%package -n ocfs-tools
+Summary: Tools for managing the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: ocfs = %{version}, gtk+ >= 1.2.8
+BuildRequires: gtk+-devel >= 1.2.8
+AutoReqProv: Yes
+
+
+%description -n ocfs-tools
+Tools to manage the Oracle Cluster Filesystem
+
+
+%package -n ocfs-support
+Summary: Support programs for the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: fileutils, sh-utils, net-tools, chkconfig, modutils
+AutoReqProv: No
+
+
+%description -n ocfs-support
+Support programs for using the Oracle Cluster Filesystem.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+ KVER="%{kver}"
+else
+ CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+ case "$CURKVER" in
+ %{base}*)
+ if test -d "/usr/src/linux-${CURKVER}"; then
+ KVER="${CURKVER}"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+if test -z "$KVER" ; then
+ if test -d "/usr/src/linux-2.4" ; then
+ KPATH="/usr/src/linux-2.4"
+ elif test -d "/usr/src/linux" ; then
+ KPATH="/usr/src/linux"
+ else
+ echo "No kernel tree to build from!" >&2
+ exit 1
+ fi
+else
+ KPATH="/usr/src/linux-${KVER}"
+fi
+
+%configure --sbindir=/sbin --with-kernel="${KPATH}"
+cd ocfs2
+
+%if %{buildup}
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs" install
+%endif
+
+%if %{buildsmp}
+make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs" install
+%endif
+
+%if %{builddebug}
+make clean
+make KVER=debug
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-debug-ABI/ocfs" install
+%endif
+
+
+cd ../tools
+make
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+cp -f redhat/ocfs.init $RPM_BUILD_ROOT/etc/init.d/ocfs
+
+cd tools
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%pre -n ocfs-support
+# Cleanup for bad RPMs
+if [ -e /usr/sbin/load_ocfs ] ; then
+ rm -f /usr/sbin/load_ocfs
+fi
+
+if [ -e /usr/sbin/ocfs_uid_gen ] ; then
+ rm -f /usr/sbin/ocfs_uid_gen
+fi
+
+%post -n ocfs-support
+chkconfig ocfs on
+/etc/init.d/ocfs link
+
+
+%if %{buildup}
+%post
+/etc/init.d/ocfs link
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{base}-ABI/ocfs
+%endif
+
+%if %{buildsmp}
+%post smp
+/etc/init.d/ocfs link
+
+%files smp
+%defattr(-,root,root)
+/lib/modules/%{base}-smp-ABI/ocfs
+%endif
+
+%if %{builddebug}
+%files debug
+%defattr(-,root,root)
+/lib/modules/%{base}-debug-ABI/ocfs
+%endif
+
+
+%files -n ocfs-tools
+%defattr(-,root,root)
+/usr/bin
+/usr/share
+
+
+%files -n ocfs-support
+%defattr(-,root,root)
+/sbin/load_ocfs
+/sbin/mkfs.ocfs
+/sbin/mounted.ocfs
+/sbin/fsck.ocfs
+/sbin/ocfs_uid_gen
+/etc/init.d/ocfs
+
+
+%changelog
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce <philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup
Modified: branches/ocfs-1.0/redhat/ocfs-2.4.9-e.spec.in
===================================================================
--- branches/ocfs-1.0/redhat/ocfs-2.4.9-e.spec.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/redhat/ocfs-2.4.9-e.spec.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,5 +1,5 @@
#
-# Spec file for cvsman
+# Spec file for ocfs
#
# Macros
@@ -19,6 +19,7 @@
# This must be changed to the minimum ABI compat kernel version expected
%define base 2.4.9-e
%define kver %{base}.12
+%define kveraio %{base}.25
Summary: The Oracle Cluster Filesystem
Name: ocfs-%{base}
@@ -52,7 +53,7 @@
Group: System Environment/Kernel
Provides: ocfs = %{version}
Requires: kernel-smp >= %{kver}
-Requires: ocfs-support >= 1.0.8
+Requires: ocfs-support >= 1.0.9
Obsoletes: ocfs-2.4.9-e.3-smp, ocfs-2.4.9-e.8-smp, ocfs-2.4.9-e.9-smp, ocfs-2.4.9-e.10-smp, ocfs-2.4.9-e.12-smp
BuildRequires: kernel-source >= %{kver}
AutoReqProv: no
@@ -70,7 +71,7 @@
Group: System Environment/Kernel
Provides: ocfs = %{version}
Requires: kernel-enterprise >= %{kver}
-Requires: ocfs-support >= 1.0.8
+Requires: ocfs-support >= 1.0.9
Obsoletes: ocfs-2.4.9-e.3-enterprise, ocfs-2.4.9-e.8-enterprise, ocfs-2.4.9-e.9-enterprise, ocfs-2.4.9-e.10-enterprise, ocfs-2.4.9-e.12-enterprise
BuildRequires: kernel-source >= %{kver}
AutoReqProv: no
@@ -88,7 +89,7 @@
Group: System Environment/Kernel
Provides: ocfs = %{version}
Requires: kernel-summit >= %{kver}
-Requires: ocfs-support >= 1.0.8
+Requires: ocfs-support >= 1.0.9
Obsoletes: ocfs-2.4.9-e.3-summit, ocfs-2.4.9-e.8-summit, ocfs-2.4.9-e.9-summit, ocfs-2.4.9-e.10-summit, ocfs-2.4.9-e.12-summit
BuildRequires: kernel-source >= %{kver}
AutoReqProv: no
@@ -100,24 +101,6 @@
%endif
-%if %{builddebug}
-%package debug
-Summary: The Oracle Cluster Filesystem for debugging systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-Requires: kernel-debug >= %{kver}
-Requires: ocfs-support >= 1.0.8
-Obsoletes: ocfs-2.4.9-e.3-debug, ocfs-2.4.9-e.8-debug, ocfs-2.4.9-e.9-debug, ocfs-2.4.9-e.10-debug, ocfs-2.4.9-e.12-debug
-BuildRequires: kernel-source >= %{kver}
-AutoReqProv: no
-
-
-%description debug
-OCFS is the Oracle Cluster Filesystem. This package is compiled for
-debugging kernels.
-%endif
-
-
%package -n ocfs-tools
Summary: Tools for managing the Oracle Cluster Filesystem
Group: System Environment/Kernel
@@ -151,58 +134,33 @@
if test -d "/usr/src/linux-%{kver}"; then
KVER="%{kver}"
else
- CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
- case "$CURKVER" in
- %{base}*)
- if test -d "/usr/src/linux-${CURKVER}"; then
- KVER="${CURKVER}"
- fi
- ;;
- *)
- ;;
- esac
+ echo "No %{kver} kernel tree to build from!" >&2
+ exit 1
fi
-if test -z "$KVER" ; then
- if test -d "/usr/src/linux-2.4" ; then
- KPATH="/usr/src/linux-2.4"
- elif test -d "/usr/src/linux" ; then
- KPATH="/usr/src/linux"
- else
- echo "No kernel tree to build from!" >&2
- exit 1
- fi
-else
- KPATH="/usr/src/linux-${KVER}"
-fi
+KPATH="/usr/src/linux-${KVER}"
-%configure --sbindir=/sbin --with-kernel="${KPATH}"
+%configure --sbindir=/sbin --with-kernel="${KPATH}" --enable-aio=no
cd ocfs2
%if %{buildup}
make KVER=up
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs" install
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs-noaio" install
%endif
%if %{buildsmp}
make clean
make KVER=smp
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs" install
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs-noaio" install
%endif
%if %{buildenterprise}
make clean
make KVER=ent
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-enterprise-ABI/ocfs" install
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-enterprise-ABI/ocfs-noaio" install
%endif
-%if %{builddebug}
-make clean
-make KVER=debug
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-debug-ABI/ocfs" install
-%endif
-
cd ../tools
make
@@ -213,35 +171,77 @@
if test -d "/usr/src/linux-%{kver}summit"; then
KVER="%{kver}summit"
else
- CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
- case "$CURKVER" in
- %{base}*)
- if test -d "/usr/src/linux-${CURKVER}summit"; then
- KVER="${CURKVER}summit"
- fi
- ;;
- *)
- ;;
- esac
+ echo "No %{kver} summit tree to build from!" >&2
+ exit 1
fi
-if test -z "$KVER" ; then
- echo "No summit tree to build from!" >&2
+KPATH="/usr/src/linux-${KVER}"
+
+%configure --sbindir=/sbin --with-kernel="${KPATH}" --enable-aio=no
+cd ocfs2
+
+make clean
+make KVER=summit
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-summit-ABI/ocfs-noaio" install
+%endif
+
+# Now to build with AIO
+cd ..
+KVER=""
+if test -d "/usr/src/linux-%{kveraio}"; then
+ KVER="%{kveraio}"
+else
+ echo "No kernel tree to build from!" >&2
exit 1
fi
KPATH="/usr/src/linux-${KVER}"
-%configure --sbindir=/sbin --with-kernel="${KPATH}"
+%configure --sbindir=/sbin --with-kernel="${KPATH}" --enable-aio=yes
cd ocfs2
+%if %{buildup}
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs" install
+%endif
+
+%if %{buildsmp}
make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs" install
+%endif
+
+%if %{buildenterprise}
+make clean
+make KVER=ent
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-enterprise-ABI/ocfs" install
+%endif
+
+
+%if %{buildsummit}
+cd ..
+# Now to find a summit source tree
+KVER=""
+if test -d "/usr/src/linux-%{kveraio}summit"; then
+ KVER="%{kveraio}summit"
+else
+ echo "No %{kveraio} summit tree to build from!" >&2
+ exit 1
+fi
+
+KPATH="/usr/src/linux-${KVER}"
+
+%configure --sbindir=/sbin --with-kernel="${KPATH}" --enable-aio=yes
+cd ocfs2
+
+make clean
make KVER=summit
make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-summit-ABI/ocfs" install
%endif
+
%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
@@ -267,41 +267,52 @@
%post -n ocfs-support
chkconfig ocfs on
+/etc/init.d/ocfs link
-%if %{buildsmp}
+%if %{buildup}
+%post
+/etc/init.d/ocfs link
+
%files
%defattr(-,root,root)
/lib/modules/%{base}-ABI/ocfs
+/lib/modules/%{base}-ABI/ocfs-noaio
%endif
%if %{buildsmp}
+%post smp
+/etc/init.d/ocfs link
+
%files smp
%defattr(-,root,root)
/lib/modules/%{base}-smp-ABI/ocfs
+/lib/modules/%{base}-smp-ABI/ocfs-noaio
%endif
%if %{buildenterprise}
+%post enterprise
+/etc/init.d/ocfs link
+
%files enterprise
%defattr(-,root,root)
/lib/modules/%{base}-enterprise-ABI/ocfs
+/lib/modules/%{base}-enterprise-ABI/ocfs-noaio
%endif
%if %{buildsummit}
+%post summit
+/etc/init.d/ocfs link
+
%files summit
%defattr(-,root,root)
/lib/modules/%{base}-summit-ABI/ocfs
+/lib/modules/%{base}-summit-ABI/ocfs-noaio
%endif
-%if %{builddebug}
-%files debug
-%defattr(-,root,root)
-/lib/modules/%{base}-debug-ABI/ocfs
-%endif
-
%files -n ocfs-tools
%defattr(-,root,root)
/usr/bin
@@ -312,11 +323,16 @@
%defattr(-,root,root)
/sbin/load_ocfs
/sbin/mkfs.ocfs
+/sbin/mounted.ocfs
+/sbin/fsck.ocfs
/sbin/ocfs_uid_gen
/etc/init.d/ocfs
%changelog
+* Thu Jun 26 2003 Joel Becker <joel.becker at oracle.com>
+- Added noaio support.
+
* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
- Added %if %{up} and ocfs-support Requires
Modified: branches/ocfs-1.0/redhat/ocfs.init
===================================================================
--- branches/ocfs-1.0/redhat/ocfs.init 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/redhat/ocfs.init 2003-09-03 00:55:02 UTC (rev 8)
@@ -2,7 +2,7 @@
# init fragment for ocfs
#
# chkconfig: 2345 24 20
-# description: Run cvsman update at system boot
+# description: Setup OCFS environment
#
# Note that the start priority is 24. This is precisely one less than
@@ -14,49 +14,141 @@
# from trying to mount before this script has run.
#
+
+
+# Source init.d functions
+. /etc/init.d/functions
+
+# Source networking configuration
+. /etc/sysconfig/network
+
+
LOAD_OCFS=/sbin/load_ocfs
-test -x "$LOAD_OCFS" || exit 0
+if ! test -x "$LOAD_OCFS"; then
+ echo -n "Checking for /sbin/load_ocfs: "
+ failure $"load_ocfs does not exist;"
+ echo
+ exit 1
+fi
-test -r /etc/ocfs.conf || exit 0
-
KVER="`uname -r`"
case "$KVER" in
-2.4.9-e.*enterprise)
- MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
- OBJPATH="/lib/modules/2.4.9-e-enterprise-ABI/ocfs"
+2.4.9-e.*)
+ BASE_VER=2.4.9-e
;;
-2.4.9-e.*smp)
- MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
- OBJPATH="/lib/modules/2.4.9-e-smp-ABI/ocfs"
+2.4.18-e.*)
+ BASE_VER=2.4.18-e
;;
-2.4.9-e.*summit)
- MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
- OBJPATH="/lib/modules/2.4.9-e-summit-ABI/ocfs"
+2.4.20-ent.*) # Will go away with RHEL3 GA
+ BASE_VER=2.4.20-ent
;;
-2.4.9-e.*)
- MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
- OBJPATH="/lib/modules/2.4.9-e-ABI/ocfs"
+2.4.21-ent.*)
+ BASE_VER=2.4.21-ent
;;
*)
- # Not a supported kernel
- exit 0
+ echo -n "Checking for Red Hat enterprise kernel: "
+ failure $"Kernel ${KVER} is not a Red Hat enterprise release;"
+ echo
+ exit 1
;;
esac
-test -r "$OBJPATH/ocfs.o" || exit 0
+EVER="${KVER#${BASE_VER}}"
+ETYPE=""
+case "$EVER" in
+*hugemem)
+ ETYPE=hugemem
+ ;;
+*bigmem) # Will go away with RHEL3 GA
+ if test "$BASE_VER" = "2.4.20-ent"
+ then
+ ETYPE=bigmem
+ fi
+ ;;
+*smp)
+ ETYPE=smp
+ ;;
+*enterprise)
+ if test "$BASE_VER" = "2.4.9-e"
+ then
+ ETYPE=enterprise
+ fi
+ ;;
+*summit)
+ if test "$BASE_VER" = "2.4.9-e"
+ then
+ ETYPE=summit
+ fi
+ ;;
+*[0-9])
+ ETYPE=up
+ ;;
+esac
-# Source init.d functions
-. /etc/init.d/functions
+if test -z "$ETYPE"
+then
+ echo -n "Checking for Red Hat enterprise kernel: "
+ failure $"Kernel ${KVER} is not a Red Hat enterprise release;"
+ echo
+ exit 1
+fi
-# Source networking configuration
-. /etc/sysconfig/network
+EVER="${EVER%${ETYPE}}"
+EVER="${EVER#.}"
+case "$EVER" in
+[1-9])
+ ;;
+[1-9][0-9])
+ ;;
+[1-9][0-9][0-9])
+ ;;
+*)
+ echo -n "Checking for Red Hat enterprise kernel: "
+ failure $"Kernel ${KVER} is not a Red Hat enterprise release;"
+ echo
+ exit 1
+ ;;
+esac
+# This is for path happiness...
+if test "$ETYPE" != "up"
+then
+ ETYPE="${ETYPE}-"
+fi
+MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
+case "$BASE_VER" in
+2.4.9-e)
+ if test "${EVER}" -gt 23
+ then
+ OBJPATH="/lib/modules/2.4.9-e-${ETYPE}ABI/ocfs"
+ else
+ OBJPATH="/lib/modules/2.4.9-e-${ETYPE}ABI/ocfs-noaio"
+ fi
+ ;;
+2.4.18-e)
+ OBJPATH="/lib/modules/${BASE_VER}-${ETYPE}ABI/ocfs"
+ ;;
+2.4.20-ent) # Will go away with RHEL3 GA
+ OBJPATH="/lib/modules/${BASE_VER}-${ETYPE}ABI/ocfs"
+ ;;
+2.4.21-ent)
+ OBJPATH="/lib/modules/${BASE_VER}-${ETYPE}ABI/ocfs"
+ ;;
+*)
+ echo -n "Checking for Red Hat enterprise kernel: "
+ failure $"Can't get here! (Kernel ${KVER});"
+ echo
+ exit 1
+esac
+test -r "$OBJPATH/ocfs.o" || exit 0
+
+
fstab_check()
{
# Are there any volumes to mount?
ANY="`awk '/^[ ]*#/{next}$4 ~ /^noauto$|^noauto,|,noauto$/{next}$3 == "ocfs"{print $2}' /etc/fstab 2>/dev/null`"
- test -z "$ANY" && exit 0
+ test -z "$ANY" && return
# Check if anything is missing netdev
ANY="`awk '/^[ ]*#/{next}$4 ~ /^noauto$|^noauto,|,noauto$/{next}$4 ~ /^_netdev$|^_netdev,|,_netdev$/{next}$3 == "ocfs"{print $2}' /etc/fstab 2>/dev/null`"
@@ -65,10 +157,25 @@
module_link()
{
- # Assume any symlink is OK - caveat emptor for non-RPM users
- test -L "${MODPATH}/ocfs.o" && return
+ if test -L "${MODPATH}/ocfs.o"
+ then
+ LINKTARGET="`ls -l "${MODPATH}/ocfs.o" 2>/dev/null | sed -e 's/^.* -> //'`"
+ case "${LINKTARGET}" in
+ ${OBJPATH}/ocfs.o)
+ return
+ ;;
+ ${OBJPATH%-noaio}/ocfs.o)
+ ;;
+ ${OBJPATH}-noaio/ocfs.o)
+ ;;
+ *)
+ return
+ ;;
+ esac
+ rm -f "${MODPATH}/ocfs.o"
+ fi
- echo -n "Linking OCFS module into the module path"
+ echo -n "Linking OCFS module into the module path "
# Same deal for modules that are physically there
if test -f "${MODPATH}/ocfs.o" ; then
@@ -87,7 +194,7 @@
echo "Warning: Moving ancient ocfs.o out of the way"
mv -f "${MODPATH}/ocfs.o" "${MODPATH}/ocfs.o.preABI" >/dev/null 2>&1
if test "$?" != 0 ; then
- failure $"Unable to move ancient ocfs module out of the way"
+ failure $"Unable to move ancient ocfs module out of the way;"
echo
exit 1
fi
@@ -96,13 +203,13 @@
if test ! -d "$MODPATH" ; then
if test -e "${MODPATH}"; then
- failure $"Path \"${MODPATH}\" already exists, but is not a directory"
+ failure $"Path \"${MODPATH}\" already exists, but is not a directory;"
echo
exit 1
else
mkdir -p "$MODPATH" >/dev/null 2>&1
if test $? != 0; then
- failure $"Unable to create directory \"${MODPATH}\""
+ failure $"Unable to create directory \"${MODPATH}\";"
echo
exit 1
fi
@@ -111,7 +218,7 @@
ln -s "${OBJPATH}/ocfs.o" "${MODPATH}/ocfs.o" >/dev/null 2>&1
if test $? != 0; then
- failure $"Unable to create symbolic link \"${MODPATH}/ocfs.o\""
+ failure $"Unable to create symbolic link \"${MODPATH}/ocfs.o\";"
echo
exit 1
fi
@@ -123,18 +230,25 @@
case "$1" in
start)
module_link
+
fstab_check
- echo -n $"Loading OCFS:"
+ echo -n $"Loading OCFS: "
+ if ! test -r /etc/ocfs.conf; then
+ failure $"No configuration file /etc/ocfs.conf; loading OCFS;"
+ echo
+ exit 1
+ fi
+
if test "$NETWORKING" = "no"; then
- failure $"Network is unavailable"
+ failure $"Network is unavailable; loading OCFS;"
echo
exit 1
fi
if grep '^ocfs ' /proc/modules >/dev/null 2>&1; then
- success $"OCFS is already loaded"
+ success $"OCFS is already loaded;"
echo
exit 0
fi
@@ -146,6 +260,23 @@
;;
+ link)
+ module_link
+ ;;
+
+ status)
+ echo -n $"Checking if OCFS is loaded: "
+ if grep '^ocfs ' /proc/modules >/dev/null 2>&1; then
+ success $"OCFS is already loaded; status"
+ echo
+ exit 0
+ else
+ failure $"OCFS is not loaded; status"
+ echo
+ exit 1
+ fi
+ ;;
+
stop|force-reload|restart)
RETVAL=0
;;
Modified: branches/ocfs-1.0/tools/debugocfs/Makefile
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -3,20 +3,27 @@
include $(TOPDIR)/Preamble.make
BIN_PROGRAMS = debugocfs extfinder
+SBIN_EXTRA = fsck.ocfs
+
LIBRARIES = $(LIBDEBUGOCFS)
-WARNINGS = -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes \
- -Wmissing-declarations
+# Too many warnings in 1.0 branch (cleaned in 2.0)
+#WARNINGS = -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes \
+# -Wmissing-declarations
-CFLAGS = $(WARNINGS)
+CFLAGS = -fno-strict-aliasing $(WARNINGS)
INCLUDES = -I. -I$(TOPDIR)/ocfs2/Common/inc -I$(TOPDIR)/ocfs2/Linux/inc
DEFINES = -DLINUX -DUSERSPACE_TOOL
ifeq ($(OCFS_PROCESSOR),x86_64)
- DEFINES += -Dx86_64
CFLAGS += -O0 -m64
-else
+endif
+ifeq ($(OCFS_PROCESSOR),ia64)
+ CFLAGS += -O0
+endif
+ifeq ($(OCFS_PROCESSOR),i686)
+ DEFINES += -D__ILP32__
CFLAGS += -O2
endif
@@ -34,7 +41,7 @@
CLEAN_FILES = test
-DIST_FILES = debugocfs.c debugocfs.h libdebugocfs.h test.c print.c dummy.c dummy.h libdebugocfs.c io.c main.c extfinder.c ocfsmalloc.c ocfsmalloc.h
+DIST_FILES = debugocfs.c debugocfs.h libdebugocfs.h test.c print.c dummy.c dummy.h libdebugocfs.c io.c main.c extfinder.c ocfsmalloc.c ocfsmalloc.h fsck.ocfs
test: test.o libdebugocfs.a
$(LINK) -L. -ldebugocfs $(GTK_LIBS)
@@ -54,7 +61,7 @@
libdebugocfs.o: libdebugocfs.c
$(CC) $(CFLAGS) $(INCLUDES) $(GTK_CFLAGS) -DLIBDEBUGOCFS $(DEFINES) -o $@ -c $<
-libdebugocfs.a: io.o dbg.o libdebugocfs.o ocfsgensysfile.o ocfsbitmap.o ocfsgenalloc.o ocfsport.o dummy.o
+libdebugocfs.a: io.o dbg.o libdebugocfs.o ocfsgensysfile.o ocfsbitmap.o ocfsgenalloc.o ocfsport.o dummy.o ocfsmalloc.o
rm -f $@
$(AR) r $@ $^
$(RANLIB) $@
Modified: branches/ocfs-1.0/tools/debugocfs/debugocfs.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/debugocfs.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/debugocfs.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -89,11 +89,16 @@
int i;
__u64 dirPartOffset;
- dir = (ocfs_dir_node *) malloc(DIR_NODE_SIZE);
+ dir = (ocfs_dir_node *) malloc_aligned(DIR_NODE_SIZE);
dirPartOffset = offset;
while (1)
{
+ if (dirPartOffset == 0)
+ {
+ /* this is an error, but silently fail */
+ break;
+ }
read_dir_node(fd, dir, dirPartOffset);
for (i = 0; i < dir->num_ent_used; i++)
{
@@ -197,7 +202,7 @@
int i, fd;
bool prev_ptr_error;
- if ((ext = malloc(512)) == NULL) {
+ if ((ext = malloc_aligned(512)) == NULL) {
printf("error: out of memory\n");
return ;
}
@@ -249,7 +254,7 @@
int type;
bool prev_ptr_error;
- if ((ext = malloc(512)) == NULL) {
+ if ((ext = malloc_aligned(512)) == NULL) {
printf("error: out of memory\n");
return ;
}
@@ -304,11 +309,16 @@
__u64 ret = 0, dirPartOffset;
fd = (int) vcb->hbt;
- dir = (ocfs_dir_node *) malloc(DIR_NODE_SIZE);
+ dir = (ocfs_dir_node *) malloc_aligned(DIR_NODE_SIZE);
dirPartOffset = offset;
while (1)
{
+ if (dirPartOffset == 0)
+ {
+ /* this is an error, but silently fail */
+ break;
+ }
read_dir_node(fd, dir, dirPartOffset);
for (i = 0; i < dir->num_ent_used; i++)
{
@@ -319,7 +329,7 @@
fe = (ocfs_file_entry *) (((void *) dir) + off);
newname =
- (char *) malloc(strlen(parent) + strlen(fe->filename) + 2);
+ (char *) malloc_aligned(strlen(parent) + strlen(fe->filename) + 2);
if (fe->attribs & OCFS_ATTRIB_DIRECTORY)
{
@@ -343,7 +353,7 @@
}
else if (mode == FIND_MODE_DIR)
{
- foundDir = (ocfs_dir_node *) malloc(DIR_NODE_SIZE);
+ foundDir = (ocfs_dir_node *) malloc_aligned(DIR_NODE_SIZE);
read_dir_node(fd, foundDir, fe->extents[0].disk_off);
print_dir_node(foundDir);
free(foundDir);
@@ -446,7 +456,7 @@
newfd = mkdir(file, data.mode);
else if (S_ISREG(data.mode))
{
- void *filebuf = malloc(FILE_BUFFER_SIZE);
+ void *filebuf = malloc_aligned(FILE_BUFFER_SIZE);
__u32 remaining, readlen;
newfd = creat(file, data.mode);
Modified: branches/ocfs-1.0/tools/debugocfs/debugocfs.h
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/debugocfs.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/debugocfs.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -84,6 +84,7 @@
void print_publish_sector(void *buf);
void print_vote_sector(void *buf);
void print_file_entry(void *buf);
+void print_extent_ex(void *buf);
void print_extent(void *buf, int twolongs, bool prev_ptr_error);
void print_cdsl_offsets(void *buf);
void print_record(void *rec, int type);
Modified: branches/ocfs-1.0/tools/debugocfs/dummy.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/dummy.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/dummy.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -184,7 +184,7 @@
ocfs_super *vcb;
/* fake a few VCB values */
- vcb = (ocfs_super *) malloc(sizeof(ocfs_super));
+ vcb = (ocfs_super *) malloc_aligned(sizeof(ocfs_super));
vcb->vol_layout.root_start_off = hdr->root_off;
vcb->vol_layout.root_int_off = hdr->internal_off;
Modified: branches/ocfs-1.0/tools/debugocfs/dummy.h
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/dummy.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/dummy.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -92,6 +92,7 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
+#include <time.h>
/* reqd by ocfsformat */
#undef WNOHANG
Modified: branches/ocfs-1.0/tools/debugocfs/extfinder.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/extfinder.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/extfinder.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,3 +1,28 @@
+/*
+ * extfinder.c
+ *
+ * Lists the free extent sizes of an ocfs volume
+ *
+ * Copyright (C) 2003 Oracle. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran
+ */
+
#include "debugocfs.h"
#include "glib.h"
#include <stdio.h>
@@ -3,5 +28,9 @@
#include <stdlib.h>
+int bmrun_reversesort(const void *a, const void *b);
+void print_global_bitmap_runs(int fd, void *buf);
+
int extents_to_print = 0;
+int verbose = 0;
typedef struct _bitmap_run
@@ -14,6 +43,7 @@
#define MAX_BITMAP_RUNS 10
+
int bmrun_reversesort(const void *a, const void *b)
{
bitmap_run *one, *two;
@@ -30,27 +60,30 @@
void print_global_bitmap_runs(int fd, void *buf)
{
- __u64 dso, cs, num;
- char *bmbuf;
- int bufsz;
- ocfs_vol_disk_hdr * v = (ocfs_vol_disk_hdr *)buf;
+ __u64 dso, cs, num;
+ char *bmbuf;
+ int bufsz;
+ ocfs_vol_disk_hdr * v = (ocfs_vol_disk_hdr *)buf;
int non_sysfile, sysfile;
int i;
bitmap_run run;
GArray *arr = g_array_new(TRUE, TRUE, sizeof(bitmap_run));
- dso = v->data_start_off;
- cs = v->cluster_size;
- num = v->num_clusters;
- bufsz = (num+7)/8;
- bmbuf = (char *)malloc(bufsz);
- lseek64(fd, v->bitmap_off, SEEK_SET);
- read(fd, bmbuf, bufsz);
+ dso = v->data_start_off;
+ cs = v->cluster_size;
+ num = v->num_clusters;
+ bufsz = (num+7)/8;
+ bmbuf = (char *)malloc(bufsz);
+ lseek64(fd, v->bitmap_off, SEEK_SET);
+ read(fd, bmbuf, bufsz);
- printf("\tbitmap_off = %llu\n", v->bitmap_off);
- printf("\tdata_start_off = %llu\n", v->data_start_off);
- printf("\tcluster_size = %llu\n", v->cluster_size);
- printf("\tnum_clusters = %llu\n", v->num_clusters);
+ if (verbose)
+ {
+ printf("bitmap_off = %llu\n", v->bitmap_off);
+ printf("data_start_off = %llu\n", v->data_start_off);
+ printf("cluster_size = %llu\n", v->cluster_size);
+ printf("num_clusters = %llu\n", v->num_clusters);
+ }
sysfile = ((8 * ONE_MEGA_BYTE) / v->cluster_size);
non_sysfile = v->num_clusters - sysfile;
@@ -61,7 +94,7 @@
run.size=0;
for (i=0; i<non_sysfile; i++)
{
- if (!test_bit(i, bmbuf))
+ if (!test_bit(i, bmbuf))
{
run.size++;
if (run.start==-1)
@@ -81,14 +114,17 @@
g_array_append_val(arr, run);
- if (arr->len > 0)
+ printf("Runs of contiguous free space available (decending order)\n");
+ printf("Run #\tLength (KB)\tStarting bit number\n");
+ printf("=====\t===========\t===================\n");
+ if (arr->len > 0)
{
qsort(arr->data, arr->len, sizeof(bitmap_run), bmrun_reversesort);
- for (i=0; i<(arr->len > extents_to_print ? extents_to_print : arr->len); i++)
+ for (i=0; i<(arr->len > extents_to_print ? extents_to_print : arr->len); i++)
{
bitmap_run *run = &g_array_index(arr, bitmap_run, i);
__u64 kb = (((__u64)run->size) * v->cluster_size) / 1024ULL;
- printf("\trun_%d = %llu KB\n", i+1, kb);
+ printf("%5d\t%11llu\t%-9d\n", i+1, kb, run->start);
}
}
@@ -101,11 +137,17 @@
{
lseek64(fd, 0, SEEK_SET);
read(fd, v, sizeof(ocfs_vol_disk_hdr));
+ if (strncmp(v->signature, "OracleCFS", strlen("OracleCFS")) != 0)
+ {
+ fprintf(stderr, "not a valid ocfs partition!\n");
+ usage();
+ exit(1);
+ }
}
void usage()
{
- printf("extfinder /dev/device [num_to_print]\n");
+ printf("usage: extfinder /dev/device\n");
}
Modified: branches/ocfs-1.0/tools/debugocfs/io.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/io.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/io.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -155,7 +155,6 @@
void read_extent(int fd, ocfs_extent_group * e, __u64 offset)
{
- loff_t res;
myseek64(fd, offset, SEEK_SET);
if (read(fd, e, 512) != 512)
printf("hmm... short read for extent\n");
Modified: branches/ocfs-1.0/tools/debugocfs/main.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/main.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/main.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -33,6 +33,8 @@
extern __u32 OcfsDebugCtxt;
extern __u32 OcfsDebugLevel;
+void translate_usage(void);
+void do_translate(int argc, char **argv);
/* global stuff */
int filenum;
@@ -101,7 +103,7 @@
while (1)
{
- c = getopt(argc, argv, "o:h:l:s:t:");
+ c = getopt(argc, argv, "2o:h:l:s:t:");
if (c == -1)
break;
switch (c)
@@ -115,16 +117,19 @@
}
break;
case 'h':
- off |= ((__u64) atol(optarg)) << 32;
+ off |= ((__u64) strtoul(optarg, NULL, 0)) << 32;
ok = !ok;
break;
case 'l':
- off |= atol(optarg);
+ off |= strtoul(optarg, NULL, 0);
ok = !ok;
break;
case 't':
type = (char *) strdup(optarg);
break;
+ case '2': /* display 8-byte nums as 2 4-byte nums */
+ args.twoFourbyte = true;
+ break;
case '?':
translate_usage();
exit(1);
@@ -182,7 +187,7 @@
else if (strcasecmp(type, "ocfs_extent_group") == 0)
{
size = sizeof(ocfs_extent_group);
- func = print_extent;
+ func = print_extent_ex;
}
else
{
@@ -190,7 +195,7 @@
exit(1);
}
- fd = open(argv[optind], O_RDONLY);
+ fd = open(argv[optind], O_RDONLY|O_DIRECT);
if (fd == -1)
{
printf("Oops. You didn't give a valid device.\n");
@@ -202,7 +207,7 @@
{
void *buf;
- buf = malloc(size);
+ buf = malloc_aligned(size);
if (buf == NULL)
{
printf("failed to alloc %d bytes\n", size);
@@ -362,7 +367,7 @@
exit(1);
}
- fd = open(argv[optind], O_RDONLY);
+ fd = open(argv[optind], O_RDONLY|O_DIRECT);
if (fd == -1)
{
usage();
@@ -431,7 +436,7 @@
printf("dirinfo:\n");
if (strcmp(args.dirent, "/") == 0)
{
- ocfs_dir_node *dir = (ocfs_dir_node *) malloc(DIR_NODE_SIZE);
+ ocfs_dir_node *dir = (ocfs_dir_node *) malloc_aligned(DIR_NODE_SIZE);
read_dir_node(fd, dir, diskHeader->root_off);
printf("\tName = /\n");
Modified: branches/ocfs-1.0/tools/debugocfs/ocfsmalloc.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/ocfsmalloc.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/ocfsmalloc.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -31,34 +31,15 @@
#include "ocfsmalloc.h"
-#define SECTSIZE 512
-#define OVERHEAD (sizeof(void *))
+void *memalign(size_t boundary, size_t size);
-void * malloc_aligned(int size) {
- void *orig, *cnt;
- long dummy;
-
- size = size + OVERHEAD;
- size = size + SECTSIZE;
- orig = malloc(size);
-
- for(cnt = orig; cnt < orig + SECTSIZE; cnt++) {
- if ((long) cnt % (long) SECTSIZE == 0)
- break;
- }
-
- dummy = (long) orig;
- memcpy(cnt-OVERHEAD, &dummy, OVERHEAD);
-
- return(cnt);
+void * malloc_aligned(int size)
+{
+ return memalign(512, size);
}
-void free_aligned(void *ptr) {
-#if 0
- void *orig;
-
- orig = ptr - OVERHEAD;
-
- free(orig);
-#endif
+void free_aligned(void *ptr)
+{
+ if (ptr)
+ free(ptr);
}
Modified: branches/ocfs-1.0/tools/debugocfs/print.c
===================================================================
--- branches/ocfs-1.0/tools/debugocfs/print.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/debugocfs/print.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -36,6 +36,17 @@
void print_time(__u64 * sec);
void print_file_attributes(__u32 attribs);
void print_protection_bits(__u32 prot);
+void print_global_bitmap(int fd, void *buf);
+void print_system_file(int fd, ocfs_vol_disk_hdr * v, int fileid);
+void print_file_data(int fd, ocfs_file_entry * fe);
+void print_alloc_log(ocfs_alloc_log * rec);
+void print_dir_log(ocfs_dir_log * rec);
+void print_recovery_log(ocfs_recovery_log * rec);
+void print_lock_log(ocfs_lock_log * rec);
+void print_bcast_rel_log(ocfs_bcast_rel_log * rec);
+void print_delete_log(ocfs_delete_log * rec);
+void print_free_log(ocfs_free_log * rec);
+void print_extent_rec(ocfs_free_extent_log * rec);
typedef __u64 (*bit2off_func)(int bitnum, void *data);
@@ -139,6 +150,7 @@
int i;
ocfs_dir_node * d = (ocfs_dir_node *)buf;
+ print_disk_lock(&d->disk_lock);
printf("\talloc_file_off = %llu\n", d->alloc_file_off);
printf("\talloc_node = %u\n", d->alloc_node);
printf("\tfree_node_ptr = ");
@@ -181,6 +193,7 @@
ocfs_file_entry * fe = (ocfs_file_entry *)buf;
char fname[OCFS_MAX_FILENAME_LENGTH + 1];
int i;
+ ocfs_alloc_ext *ext;
strncpy(fname, fe->filename, OCFS_MAX_FILENAME_LENGTH);
fname[OCFS_MAX_FILENAME_LENGTH] = '\0';
@@ -189,14 +202,22 @@
printf("\tgranularity = %d\n", fe->granularity);
printf("\tfilename = %s\n", fname);
printf("\tfilename_len = %d\n", fe->filename_len);
- printf("\tfile_size = %llu\n", fe->file_size);
- printf("\talloc_size = %llu\n", fe->alloc_size);
+ if (args.twoFourbyte)
+ printf("\tfile_size = %u.%u\n", HILO(fe->file_size));
+ else
+ printf("\tfile_size = %llu\n", fe->file_size);
+ if (args.twoFourbyte)
+ printf("\talloc_size = %u.%u\n", HILO(fe->alloc_size));
+ else
+ printf("\talloc_size = %llu\n", fe->alloc_size);
printf("\tattribs = ");
print_file_attributes((__u32) fe->attribs);
printf("\tprot_bits = ");
print_protection_bits((__u32) fe->prot_bits);
printf("\tuid = %d\n", fe->uid);
printf("\tgid = %d\n", fe->gid);
+ printf("\tcreate_time = ");
+ print_time(&(fe->create_time));
printf("\tmodify_time = ");
print_time(&(fe->modify_time));
printf("\tdir_node_ptr = ");
@@ -213,15 +234,26 @@
for (i = 0; i < OCFS_MAX_FILE_ENTRY_EXTENTS; i++)
{
- printf("\textent[%d].file_off = %llu\n", i, fe->extents[i].file_off);
- printf("\textent[%d].num_bytes = %llu\n", i,
- fe->extents[i].num_bytes);
- printf("\textent[%d].disk_off = %llu\n", i, fe->extents[i].disk_off);
+ ext = &(fe->extents[i]);
+ if (args.twoFourbyte) {
+ printf("\textent[%d].file_off = %u.%u\n", i, HILO(ext->file_off));
+ printf("\textent[%d].num_bytes = %u.%u\n", i, HILO(ext->num_bytes));
+ printf("\textent[%d].disk_off = %u.%u\n", i, HILO(ext->disk_off));
+ } else {
+ printf("\textent[%d].file_off = %llu\n", i, ext->file_off);
+ printf("\textent[%d].num_bytes = %llu\n", i, ext->num_bytes);
+ printf("\textent[%d].disk_off = %llu\n", i, ext->disk_off);
+ }
}
printf("\n");
}
+void print_extent_ex(void *buf)
+{
+ print_extent(buf, 1, args.twoFourbyte);
+}
+
void print_extent(void *buf, int twolongs, bool prev_ptr_error)
{
ocfs_extent_group * exthdr = (ocfs_extent_group *)buf;
@@ -229,6 +261,7 @@
int i;
__u64 len;
char err[200];
+ ocfs_alloc_ext *ext;
#define ERROR_STR "<========== ERROR"
@@ -241,18 +274,16 @@
printf("\tgranularity = %d\n", exthdr->granularity);
printf("\talloc_node = %u\n", exthdr->alloc_node);
-#define TWO(a) HI(a), LO(a)
-
*err = '\0';
if (prev_ptr_error)
strcpy(err, ERROR_STR);
if (twolongs) {
- printf("\tthis_ext = %u.%u\n", TWO(exthdr->this_ext));
- printf("\tnext_data_ext = %u.%u\n", TWO(exthdr->next_data_ext));
- printf("\talloc_file_off = %u.%u\n", TWO(exthdr->alloc_file_off));
- printf("\tlast_ext_ptr = %u.%u\n", TWO(exthdr->last_ext_ptr));
- printf("\tup_hdr_node_ptr = %u.%u %s\n", TWO(exthdr->up_hdr_node_ptr), err);
+ printf("\tthis_ext = %u.%u\n", HILO(exthdr->this_ext));
+ printf("\tnext_data_ext = %u.%u\n", HILO(exthdr->next_data_ext));
+ printf("\talloc_file_off = %u.%u\n", HILO(exthdr->alloc_file_off));
+ printf("\tlast_ext_ptr = %u.%u\n", HILO(exthdr->last_ext_ptr));
+ printf("\tup_hdr_node_ptr = %u.%u %s\n", HILO(exthdr->up_hdr_node_ptr), err);
} else {
printf("\tthis_ext = %llu\n", exthdr->this_ext);
printf("\tnext_data_ext = %llu\n", exthdr->next_data_ext);
@@ -264,23 +295,23 @@
len = exthdr->extents[0].file_off;
for (i = 0; i < OCFS_MAX_DATA_EXTENTS; i++) {
- if (exthdr->extents[i].file_off == 0)
+ ext = &(exthdr->extents[i]);
+ if (ext->file_off == 0)
len = 0;
*err = '\0';
- if (len != exthdr->extents[i].file_off)
- sprintf(err, "%s(%llu, %llu)", ERROR_STR, len, len - exthdr->extents[i].file_off);
+ if (len != ext->file_off)
+ sprintf(err, "%s(%llu, %llu)", ERROR_STR, len, len - ext->file_off);
if (twolongs) {
- printf("\textent[%d].file_off = %u.%u %s\n", i, TWO(exthdr->extents[i].file_off), err);
- printf("\textent[%d].num_bytes = %u.%u\n", i, TWO(exthdr->extents[i].num_bytes));
- printf("\textent[%d].disk_off = %u.%u\n", i, TWO(exthdr->extents[i].disk_off));
+ printf("\textent[%d].file_off = %u.%u %s\n", i, HILO(ext->file_off), err);
+ printf("\textent[%d].num_bytes = %u.%u\n", i, HILO(ext->num_bytes));
+ printf("\textent[%d].disk_off = %u.%u\n", i, HILO(ext->disk_off));
} else {
- printf("\textent[%d].file_off = %llu %s\n", i, exthdr->extents[i].file_off, err);
- printf("\textent[%d].num_bytes = %llu\n", i, exthdr->extents[i].num_bytes);
- printf("\textent[%d].disk_off = %llu\n", i, exthdr->extents[i].disk_off);
+ printf("\textent[%d].file_off = %llu %s\n", i, ext->file_off, err);
+ printf("\textent[%d].num_bytes = %llu\n", i, ext->num_bytes);
+ printf("\textent[%d].disk_off = %llu\n", i, ext->disk_off);
}
- len += exthdr->extents[i].num_bytes;
+ len += ext->num_bytes;
}
-#undef TWO(a)
printf("\n");
}
@@ -552,8 +583,12 @@
{
if (ptr == INVALID_NODE_POINTER)
printf("INVALID_NODE_POINTER\n");
- else
- printf("%llu\n", ptr);
+ else {
+ if (args.twoFourbyte)
+ printf("%u.%u\n", HILO(ptr));
+ else
+ printf("%llu\n", ptr);
+ }
}
void print___u64_as_bitmap(__u64 x)
@@ -806,6 +841,16 @@
printf("FLAG_DEL_NAME ");
if (type & FLAG_RESET_VALID)
printf("FLAG_RESET_VALID ");
+ if (type & FLAG_FILE_RELEASE_CACHE)
+ printf("FLAG_FILE_RELEASE_CACHE ");
+ if (type & FLAG_FILE_CREATE_CDSL)
+ printf("FLAG_FILE_CREATE_CDSL ");
+ if (type & FLAG_FILE_DELETE_CDSL)
+ printf("FLAG_FILE_DELETE_CDSL ");
+ if (type & FLAG_FILE_CHANGE_TO_CDSL)
+ printf("FLAG_FILE_CHANGE_TO_CDSL ");
+ if (type & FLAG_FILE_TRUNCATE)
+ printf("FLAG_FILE_TRUNCATE ");
printf("(0x%08x)", type);
Modified: branches/ocfs-1.0/tools/format/Makefile
===================================================================
--- branches/ocfs-1.0/tools/format/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/format/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -5,7 +5,7 @@
WARNINGS = -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes \
-Wmissing-declarations
-CFLAGS = $(WARNINGS)
+CFLAGS = -fno-strict-aliasing $(WARNINGS)
ifdef OCFS_DEBUG
CFLAGS += -g
@@ -17,9 +17,13 @@
DEFINES = -DLINUX -DUSERSPACE_TOOL
ifeq ($(OCFS_PROCESSOR),x86_64)
- DEFINES += -Dx86_64
CFLAGS += -O0 -m64
-else
+endif
+ifeq ($(OCFS_PROCESSOR),ia64)
+ CFLAGS += -O0
+endif
+ifeq ($(OCFS_PROCESSOR),i686)
+ DEFINES += -D__ILP32__
CFLAGS += -O2
endif
Modified: branches/ocfs-1.0/tools/format/format.c
===================================================================
--- branches/ocfs-1.0/tools/format/format.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/format/format.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -845,7 +845,9 @@
volhdr->root_bitmap_off = 0;
volhdr->root_bitmap_size = 0;
volhdr->data_start_off = volhdr->bitmap_off + BitmapSize + BegFreeSize;
- volhdr->data_start_off = OCFS_ALIGN(volhdr->data_start_off, PAGE_SIZE);
+#define OCFS_DATA_START_ALIGN 4096
+ volhdr->data_start_off = OCFS_ALIGN(volhdr->data_start_off,
+ OCFS_DATA_START_ALIGN);
/* calculate number of data blocks */
*data_start_off = volhdr->data_start_off;
@@ -863,36 +865,6 @@
volhdr->num_clusters = num_blocks;
-#if 0
- *non_data_size = VolHdrSize + NodeConfSize + NewConfSize + PublishSize +
- VoteSize + BitmapSize + BegFreeSize;
- DataSize = volhdr->device_size - *non_data_size - EndFreeSize;
-
- num_blocks = DataSize / volhdr->cluster_size;
- tmpbitmap = OCFS_BUFFER_ALIGN(((num_blocks + 7) / 8), sect_size);
- if (tmpbitmap > BitmapSize)
- {
- fprintf(stderr, "%dKB cluster size is too small to format "
- "the entire disk.\nPlease specify a larger value.\n",
- block_size);
- return 0;
- }
-
- /* Fill in volhdr */
- volhdr->num_clusters = num_blocks;
- volhdr->node_cfg_off = volhdr->start_off + VolHdrSize;
- volhdr->node_cfg_size = NodeConfSize;
- volhdr->new_cfg_off = volhdr->node_cfg_off + NodeConfSize;
- volhdr->publ_off = volhdr->new_cfg_off + NewConfSize;
- volhdr->vote_off = volhdr->publ_off + PublishSize;
- volhdr->bitmap_off = volhdr->vote_off + VoteSize;
- volhdr->root_off = 0;
- volhdr->root_bitmap_off = 0;
- volhdr->root_bitmap_size = 0;
- volhdr->data_start_off = volhdr->bitmap_off + BitmapSize + BegFreeSize;
- volhdr->data_start_off = OCFS_ALIGN(volhdr->data_start_off, PAGE_SIZE);
-#endif
-
return 1;
} /* InitVolumeDiskHeader */
Modified: branches/ocfs-1.0/tools/format/frmtport.c
===================================================================
--- branches/ocfs-1.0/tools/format/frmtport.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/format/frmtport.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -112,14 +112,14 @@
*/
int GetDiskGeometry(int file, __u64 * vollength, __u32 * sect_size)
{
-#ifdef x86_64
+#ifdef __LP64__
__u64 devicesize;
#else
__u32 devicesize; /* SM: should be __s32... struct hd_struct.nr_sects */
#endif
int ret = 0;
-#ifdef x86_64
+#ifdef __LP64__
#define u64 __u64
if (ioctl(file, BLKGETSIZE64, &devicesize) == -1)
#else
@@ -145,7 +145,7 @@
if (devicesize && *sect_size)
{
*vollength = devicesize;
-#ifndef x86_64
+#ifndef __LP64__
*vollength *= *sect_size;
#endif
ret = 1;
Modified: branches/ocfs-1.0/tools/ocfs_uid_gen/ocfs_uid_gen
===================================================================
--- branches/ocfs-1.0/tools/ocfs_uid_gen/ocfs_uid_gen 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/ocfs_uid_gen/ocfs_uid_gen 2003-09-03 00:55:02 UTC (rev 8)
@@ -48,6 +48,9 @@
#
+# Force LC_ALL=C for proper ifconfig(8) parsing
+export LC_ALL=C
+
#
###################################################################
# Variables
Modified: branches/ocfs-1.0/tools/ocfstool/Makefile
===================================================================
--- branches/ocfs-1.0/tools/ocfstool/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/ocfstool/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -2,6 +2,14 @@
include $(TOPDIR)/Preamble.make
+WARNINGS = -Wall
+
+CFLAGS = $(WARNINGS)
+
+ifdef OCFS_DEBUG
+CFLAGS += -g
+endif
+
BIN_PROGRAMS = ocfstool
MANS = ocfstool.1
@@ -9,7 +17,15 @@
DEFINES = -DOCFSTOOL_VERSION=\"0.0.5\"
INCLUDES = $(GTK_CFLAGS) -I../debugocfs
-CFLAGS += -Wall
+ifeq ($(OCFS_PROCESSOR),x86_64)
+ CFLAGS += -O0 -m64
+endif
+ifeq ($(OCFS_PROCESSOR),ia64)
+ CFLAGS += -O0
+endif
+ifeq ($(OCFS_PROCESSOR),i686)
+ CFLAGS += -O2
+endif
CBITS = \
ocfsbitmap.c \
Modified: branches/ocfs-1.0/tools/ocfstool/ocfsgenconfig.c
===================================================================
--- branches/ocfs-1.0/tools/ocfstool/ocfsgenconfig.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/ocfstool/ocfsgenconfig.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -166,12 +166,13 @@
fprintf (config, "#\n");
fprintf (config, "# ocfs config\n");
- fprintf (config, "# Ensure this file exists in /etc");
+ fprintf (config, "# Ensure this file exists in /etc\n");
fprintf (config, "#\n\n");
fprintf (config, "\tnode_name = %s\n", nodename);
fprintf (config, "\tnode_number = %s\n", nodenum);
fprintf (config, "\tip_address = %s\n", address);
fprintf (config, "\tip_port = %d\n", port);
+ fprintf (config, "\tcomm_voting = 1\n");
fclose (config);
Modified: branches/ocfs-1.0/tools/ocfstool/ocfsguiutil.c
===================================================================
--- branches/ocfs-1.0/tools/ocfstool/ocfsguiutil.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/ocfstool/ocfsguiutil.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -414,7 +414,7 @@
else if (bytes < 1024)
return g_strdup_printf ("%llu bytes", bytes);
- for (i = -1; i < 4 && fbytes >= 1024; i++)
+ for (i = -1; i < 3 && fbytes >= 1024; i++)
fbytes /= 1024;
if (show_bytes)
Modified: branches/ocfs-1.0/tools/sizetest/Makefile
===================================================================
--- branches/ocfs-1.0/tools/sizetest/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,53 +1,54 @@
-#
-# Makefile for OCFS
-#
+TOPDIR = ../..
-CC=gcc
+include $(TOPDIR)/Preamble.make
-# specify debug/optimize option here
-OPTS=-g
+# default include
+INC=$(KERNELDIR)/include
-PC := $(shell uname -a | cut -f 2 -d ' ')
+DEFINES=-DMODULE -DLINUX -D__KERNEL__
+CFLAGS=-nostdinc -fomit-frame-pointer -I../../ocfs2/Common/inc -I$(INC) -I../../ocfs2/Linux/inc -I$(GCCINC)
+LDADD=-nostdlib
-# default include
-INC=/usr/src/linux/include
-GCCLIB=/usr/lib/gcc-lib/i386-linux/2.95.4/include
-
-# machine specific include
-ifeq ($(PC),smushran-pc1)
- INC=/usr/src/linux/include
+ifeq ($(OCFS_PROCESSOR),x86_64)
+ CFLAGS += -O0 -m64
endif
-ifeq ($(PC),nic2-pc)
- INC=/home/wcoekaer/ocfs/linux/include
+ifeq ($(OCFS_PROCESSOR),ia64)
+ CFLAGS += -O0
endif
-ifeq ($(PC),nic6-pc)
- INC=/build/src/linux-kernel/linux-2.4.10-o4/include
+ifeq ($(OCFS_PROCESSOR),i686)
+ CFLAGS += -O2
endif
-ifeq ($(PC),ca2)
- INC=/usr/src/linux-2.4.10-o4/include
+
+ifdef OCFS_DEBUG
+ CFLAGS += -g
+ DEFINES += -DDEBUG
endif
-DEFINES=-DMODULE -DDEBUG -DLINUX
-CFLAGS=$(OPTS) -nostdinc -fomit-frame-pointer $(DEFINES) -D__KERNEL__ -I../../ocfs2/Common/inc -I$(INC) -I$(GCCLIB) -I../../ocfs2/Linux/inc
-LDADD=-nostdlib
+CFLAGS += $(DEFINES) -w
-#dummy:
-#include Cscope.make
+DIST_RULES = dist-incdir
-all: sizetest hexsizetest
+VERSION_FILES = diskstructs.c netstructs.c
+VERSION_SRC = diskstructs.c netstructs.c
+VERSION_PREFIX = OCFS
-clean:
- rm -f *.o sizetest hexsizetest 2>/dev/null
+BIN_PROGRAMS = diskstructs netstructs sizetest hexsizetest
+all: diskstructs netstructs sizetest hexsizetest
-sizetest.o: sizetest.c
- gcc -g -DDEBUG -DLINUX -nostdinc -D__KERNEL__ -I../../ocfs2/Common/inc -I../../ocfs2/Linux/inc -I$(INC) -I$(GCCLIB) -c $< -o $@
+diskstructs: diskstructs.c
+ $(LINK)
-hexsizetest.o: sizetest.c
- gcc -g -DDEBUG -DLINUX -DUSE_HEX -nostdinc -D__KERNEL__ -I../../ocfs2/Common/inc -I../../ocfs2/Linux/inc -I$(INC) -I$(GCCLIB) -c $< -o $@
+netstructs: netstructs.c
+ $(LINK)
-sizetest: sizetest.o
- gcc -g -o $@ sizetest.o
+sizetest: sizetest.c
+ $(LINK)
-hexsizetest: hexsizetest.o
- gcc -g -o $@ hexsizetest.o
+hexsizetest: sizetest.c
+ $(LINK) -DUSE_HEX
+
+dist-incdir:
+ $(TOPDIR)/mkinstalldirs $(DIST_DIR)/inc
+
+include $(TOPDIR)/Postamble.make
Added: branches/ocfs-1.0/tools/sizetest/disk.txt
===================================================================
--- branches/ocfs-1.0/tools/sizetest/disk.txt 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/disk.txt 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,940 @@
+sizeof(ocfs_alloc_ext) = 24
+ file_off = 0 (8)
+ num_bytes = 8 (8)
+ disk_off = 16 (8)
+
+sizeof(ocfs_publish) = 84
+ time = 0 (8)
+ vote = 8 (4)
+ dirty = 12 (4)
+ vote_type = 16 (4)
+ vote_map = 20 (8)
+ publ_seq_num = 28 (8)
+ dir_ent = 36 (8)
+ hbm[i] = 44 (1)
+ hbm[i] = 45 (1)
+ hbm[i] = 46 (1)
+ hbm[i] = 47 (1)
+ hbm[i] = 48 (1)
+ hbm[i] = 49 (1)
+ hbm[i] = 50 (1)
+ hbm[i] = 51 (1)
+ hbm[i] = 52 (1)
+ hbm[i] = 53 (1)
+ hbm[i] = 54 (1)
+ hbm[i] = 55 (1)
+ hbm[i] = 56 (1)
+ hbm[i] = 57 (1)
+ hbm[i] = 58 (1)
+ hbm[i] = 59 (1)
+ hbm[i] = 60 (1)
+ hbm[i] = 61 (1)
+ hbm[i] = 62 (1)
+ hbm[i] = 63 (1)
+ hbm[i] = 64 (1)
+ hbm[i] = 65 (1)
+ hbm[i] = 66 (1)
+ hbm[i] = 67 (1)
+ hbm[i] = 68 (1)
+ hbm[i] = 69 (1)
+ hbm[i] = 70 (1)
+ hbm[i] = 71 (1)
+ hbm[i] = 72 (1)
+ hbm[i] = 73 (1)
+ hbm[i] = 74 (1)
+ hbm[i] = 75 (1)
+ comm_seq_num = 76 (8)
+
+sizeof(ocfs_vote) = 52
+ vote[i] = 0 (1)
+ vote[i] = 1 (1)
+ vote[i] = 2 (1)
+ vote[i] = 3 (1)
+ vote[i] = 4 (1)
+ vote[i] = 5 (1)
+ vote[i] = 6 (1)
+ vote[i] = 7 (1)
+ vote[i] = 8 (1)
+ vote[i] = 9 (1)
+ vote[i] = 10 (1)
+ vote[i] = 11 (1)
+ vote[i] = 12 (1)
+ vote[i] = 13 (1)
+ vote[i] = 14 (1)
+ vote[i] = 15 (1)
+ vote[i] = 16 (1)
+ vote[i] = 17 (1)
+ vote[i] = 18 (1)
+ vote[i] = 19 (1)
+ vote[i] = 20 (1)
+ vote[i] = 21 (1)
+ vote[i] = 22 (1)
+ vote[i] = 23 (1)
+ vote[i] = 24 (1)
+ vote[i] = 25 (1)
+ vote[i] = 26 (1)
+ vote[i] = 27 (1)
+ vote[i] = 28 (1)
+ vote[i] = 29 (1)
+ vote[i] = 30 (1)
+ vote[i] = 31 (1)
+ vote_seq_num = 32 (8)
+ dir_ent = 40 (8)
+ open_handle = 48 (1)
+
+sizeof(ocfs_file_entry) = 484
+ disk_lock = 0 (48)
+ signature = 48 (8)
+ local_ext = 56 (4)
+ next_free_ext = 60 (1)
+ next_del = 61 (1)
+ granularity = 64 (4)
+ filename = 68 (255)
+ filename_len = 324 (2)
+ file_size = 328 (8)
+ alloc_size = 336 (8)
+ create_time = 344 (8)
+ modify_time = 352 (8)
+ extents[i] = 360 (24)
+ extents[i] = 384 (24)
+ extents[i] = 408 (24)
+ dir_node_ptr = 432 (8)
+ this_sector = 440 (8)
+ last_ext_ptr = 448 (8)
+ sync_flags = 456 (4)
+ link_cnt = 460 (4)
+ attribs = 464 (4)
+ prot_bits = 468 (4)
+ uid = 472 (4)
+ gid = 476 (4)
+ dev_major = 480 (2)
+ dev_minor = 482 (2)
+
+sizeof(ocfs_index_node) = 20
+ down_ptr = 0 (8)
+ file_ent_ptr = 8 (8)
+ name_len = 16 (1)
+ name = 17 (1)
+
+sizeof(ocfs_index_hdr) = 508
+ disk_lock = 0 (48)
+ signature = 48 (8)
+ up_tree_ptr = 56 (8)
+ node_disk_off = 64 (8)
+ state = 72 (1)
+ down_ptr = 76 (8)
+ num_ents = 84 (1)
+ depth = 85 (1)
+ num_ent_used = 86 (1)
+ dir_node_flags = 87 (1)
+ sync_flags = 88 (1)
+ index = 89 (256)
+ reserved = 345 (161)
+ file_ent = 506 (1)
+
+sizeof(ocfs_dir_node) = 512
+ disk_lock = 0 (48)
+ signature = 48 (8)
+ alloc_file_off = 56 (8)
+ alloc_node = 64 (4)
+ free_node_ptr = 68 (8)
+ node_disk_off = 76 (8)
+ next_node_ptr = 84 (8)
+ indx_node_ptr = 92 (8)
+ next_del_ent_node = 100 (8)
+ head_del_ent_node = 108 (8)
+ first_del = 116 (1)
+ num_del = 117 (1)
+ num_ents = 118 (1)
+ depth = 119 (1)
+ num_ent_used = 120 (1)
+ dir_node_flags = 121 (1)
+ sync_flags = 122 (1)
+ index = 123 (256)
+ index_dirty = 379 (1)
+ bad_off = 380 (1)
+ reserved = 381 (127)
+ file_ent = 508 (1)
+
+sizeof(ocfs_extent_group) = 504
+ signature = 0 (8)
+ next_free_ext = 8 (4)
+ curr_sect = 12 (4)
+ max_sects = 16 (4)
+ type = 20 (4)
+ granularity = 24 (4)
+ alloc_node = 28 (4)
+ this_ext = 32 (8)
+ next_data_ext = 40 (8)
+ alloc_file_off = 48 (8)
+ last_ext_ptr = 56 (8)
+ up_hdr_node_ptr = 64 (8)
+ extents[i] = 72 (24)
+ extents[i] = 96 (24)
+ extents[i] = 120 (24)
+ extents[i] = 144 (24)
+ extents[i] = 168 (24)
+ extents[i] = 192 (24)
+ extents[i] = 216 (24)
+ extents[i] = 240 (24)
+ extents[i] = 264 (24)
+ extents[i] = 288 (24)
+ extents[i] = 312 (24)
+ extents[i] = 336 (24)
+ extents[i] = 360 (24)
+ extents[i] = 384 (24)
+ extents[i] = 408 (24)
+ extents[i] = 432 (24)
+ extents[i] = 456 (24)
+ extents[i] = 480 (24)
+
+sizeof(ocfs_bitmap_lock) = 52
+ disk_lock = 0 (48)
+ used_bits = 48 (4)
+
+sizeof(ocfs_offset_map) = 20
+ length = 0 (4)
+ log_disk_off = 4 (8)
+ actual_disk_off = 12 (8)
+
+sizeof(ocfs_vol_disk_hdr) = 440
+ minor_version = 0 (4)
+ major_version = 4 (4)
+ signature = 8 (128)
+ mount_point = 136 (128)
+ serial_num = 264 (8)
+ device_size = 272 (8)
+ start_off = 280 (8)
+ bitmap_off = 288 (8)
+ publ_off = 296 (8)
+ vote_off = 304 (8)
+ root_bitmap_off = 312 (8)
+ data_start_off = 320 (8)
+ root_bitmap_size = 328 (8)
+ root_off = 336 (8)
+ root_size = 344 (8)
+ cluster_size = 352 (8)
+ num_nodes = 360 (8)
+ num_clusters = 368 (8)
+ dir_node_size = 376 (8)
+ file_node_size = 384 (8)
+ internal_off = 392 (8)
+ node_cfg_off = 400 (8)
+ node_cfg_size = 408 (8)
+ new_cfg_off = 416 (8)
+ prot_bits = 424 (4)
+ uid = 428 (4)
+ gid = 432 (4)
+ excl_mount = 436 (4)
+
+sizeof(ocfs_disk_lock) = 48
+ curr_master = 0 (4)
+ file_lock = 4 (1)
+ last_write_time = 8 (8)
+ last_read_time = 16 (8)
+ writer_node_num = 24 (4)
+ reader_node_num = 28 (4)
+ oin_node_map = 32 (8)
+ dlock_seq_num = 40 (8)
+
+sizeof(ocfs_vol_label) = 200
+ disk_lock = 0 (48)
+ label = 48 (64)
+ label_len = 112 (2)
+ vol_id = 114 (16)
+ vol_id_len = 130 (2)
+ cluster_name = 132 (64)
+ cluster_name_len = 196 (2)
+
+sizeof(ocfs_ipc_config_info) = 76
+ type = 0 (1)
+ ip_addr = 1 (33)
+ ip_port = 36 (4)
+ ip_mask = 40 (33)
+
+sizeof(ocfs_guid) = 32
+ guid = 0 (32)
+ id.host_id = 0 (20)
+ id.mac_id = 20 (12)
+
+sizeof(ocfs_disk_node_config_info) = 192
+ disk_lock = 0 (48)
+ node_name = 48 (33)
+ guid = 81 (32)
+ ipc_config = 116 (76)
+
+sizeof(ocfs_node_config_hdr) = 76
+ disk_lock = 0 (48)
+ signature = 48 (8)
+ version = 56 (4)
+ num_nodes = 60 (4)
+ last_node = 64 (4)
+ cfg_seq_num = 68 (8)
+
+sizeof(ocfs_cdsl) = 1032
+ name = 0 (1024)
+ flags = 1024 (4)
+ operation = 1028 (4)
+
+sizeof(ocfs_free_bitmap) = 24
+ length = 0 (8)
+ file_off = 8 (8)
+ type = 16 (4)
+ node_num = 20 (4)
+
+sizeof(ocfs_free_extent_log) = 16
+ index = 0 (4)
+ disk_off = 8 (8)
+
+sizeof(ocfs_free_log) = 3608
+ num_free_upds = 0 (4)
+ free_bitmap[i] = 8 (24)
+ free_bitmap[i] = 32 (24)
+ free_bitmap[i] = 56 (24)
+ free_bitmap[i] = 80 (24)
+ free_bitmap[i] = 104 (24)
+ free_bitmap[i] = 128 (24)
+ free_bitmap[i] = 152 (24)
+ free_bitmap[i] = 176 (24)
+ free_bitmap[i] = 200 (24)
+ free_bitmap[i] = 224 (24)
+ free_bitmap[i] = 248 (24)
+ free_bitmap[i] = 272 (24)
+ free_bitmap[i] = 296 (24)
+ free_bitmap[i] = 320 (24)
+ free_bitmap[i] = 344 (24)
+ free_bitmap[i] = 368 (24)
+ free_bitmap[i] = 392 (24)
+ free_bitmap[i] = 416 (24)
+ free_bitmap[i] = 440 (24)
+ free_bitmap[i] = 464 (24)
+ free_bitmap[i] = 488 (24)
+ free_bitmap[i] = 512 (24)
+ free_bitmap[i] = 536 (24)
+ free_bitmap[i] = 560 (24)
+ free_bitmap[i] = 584 (24)
+ free_bitmap[i] = 608 (24)
+ free_bitmap[i] = 632 (24)
+ free_bitmap[i] = 656 (24)
+ free_bitmap[i] = 680 (24)
+ free_bitmap[i] = 704 (24)
+ free_bitmap[i] = 728 (24)
+ free_bitmap[i] = 752 (24)
+ free_bitmap[i] = 776 (24)
+ free_bitmap[i] = 800 (24)
+ free_bitmap[i] = 824 (24)
+ free_bitmap[i] = 848 (24)
+ free_bitmap[i] = 872 (24)
+ free_bitmap[i] = 896 (24)
+ free_bitmap[i] = 920 (24)
+ free_bitmap[i] = 944 (24)
+ free_bitmap[i] = 968 (24)
+ free_bitmap[i] = 992 (24)
+ free_bitmap[i] = 1016 (24)
+ free_bitmap[i] = 1040 (24)
+ free_bitmap[i] = 1064 (24)
+ free_bitmap[i] = 1088 (24)
+ free_bitmap[i] = 1112 (24)
+ free_bitmap[i] = 1136 (24)
+ free_bitmap[i] = 1160 (24)
+ free_bitmap[i] = 1184 (24)
+ free_bitmap[i] = 1208 (24)
+ free_bitmap[i] = 1232 (24)
+ free_bitmap[i] = 1256 (24)
+ free_bitmap[i] = 1280 (24)
+ free_bitmap[i] = 1304 (24)
+ free_bitmap[i] = 1328 (24)
+ free_bitmap[i] = 1352 (24)
+ free_bitmap[i] = 1376 (24)
+ free_bitmap[i] = 1400 (24)
+ free_bitmap[i] = 1424 (24)
+ free_bitmap[i] = 1448 (24)
+ free_bitmap[i] = 1472 (24)
+ free_bitmap[i] = 1496 (24)
+ free_bitmap[i] = 1520 (24)
+ free_bitmap[i] = 1544 (24)
+ free_bitmap[i] = 1568 (24)
+ free_bitmap[i] = 1592 (24)
+ free_bitmap[i] = 1616 (24)
+ free_bitmap[i] = 1640 (24)
+ free_bitmap[i] = 1664 (24)
+ free_bitmap[i] = 1688 (24)
+ free_bitmap[i] = 1712 (24)
+ free_bitmap[i] = 1736 (24)
+ free_bitmap[i] = 1760 (24)
+ free_bitmap[i] = 1784 (24)
+ free_bitmap[i] = 1808 (24)
+ free_bitmap[i] = 1832 (24)
+ free_bitmap[i] = 1856 (24)
+ free_bitmap[i] = 1880 (24)
+ free_bitmap[i] = 1904 (24)
+ free_bitmap[i] = 1928 (24)
+ free_bitmap[i] = 1952 (24)
+ free_bitmap[i] = 1976 (24)
+ free_bitmap[i] = 2000 (24)
+ free_bitmap[i] = 2024 (24)
+ free_bitmap[i] = 2048 (24)
+ free_bitmap[i] = 2072 (24)
+ free_bitmap[i] = 2096 (24)
+ free_bitmap[i] = 2120 (24)
+ free_bitmap[i] = 2144 (24)
+ free_bitmap[i] = 2168 (24)
+ free_bitmap[i] = 2192 (24)
+ free_bitmap[i] = 2216 (24)
+ free_bitmap[i] = 2240 (24)
+ free_bitmap[i] = 2264 (24)
+ free_bitmap[i] = 2288 (24)
+ free_bitmap[i] = 2312 (24)
+ free_bitmap[i] = 2336 (24)
+ free_bitmap[i] = 2360 (24)
+ free_bitmap[i] = 2384 (24)
+ free_bitmap[i] = 2408 (24)
+ free_bitmap[i] = 2432 (24)
+ free_bitmap[i] = 2456 (24)
+ free_bitmap[i] = 2480 (24)
+ free_bitmap[i] = 2504 (24)
+ free_bitmap[i] = 2528 (24)
+ free_bitmap[i] = 2552 (24)
+ free_bitmap[i] = 2576 (24)
+ free_bitmap[i] = 2600 (24)
+ free_bitmap[i] = 2624 (24)
+ free_bitmap[i] = 2648 (24)
+ free_bitmap[i] = 2672 (24)
+ free_bitmap[i] = 2696 (24)
+ free_bitmap[i] = 2720 (24)
+ free_bitmap[i] = 2744 (24)
+ free_bitmap[i] = 2768 (24)
+ free_bitmap[i] = 2792 (24)
+ free_bitmap[i] = 2816 (24)
+ free_bitmap[i] = 2840 (24)
+ free_bitmap[i] = 2864 (24)
+ free_bitmap[i] = 2888 (24)
+ free_bitmap[i] = 2912 (24)
+ free_bitmap[i] = 2936 (24)
+ free_bitmap[i] = 2960 (24)
+ free_bitmap[i] = 2984 (24)
+ free_bitmap[i] = 3008 (24)
+ free_bitmap[i] = 3032 (24)
+ free_bitmap[i] = 3056 (24)
+ free_bitmap[i] = 3080 (24)
+ free_bitmap[i] = 3104 (24)
+ free_bitmap[i] = 3128 (24)
+ free_bitmap[i] = 3152 (24)
+ free_bitmap[i] = 3176 (24)
+ free_bitmap[i] = 3200 (24)
+ free_bitmap[i] = 3224 (24)
+ free_bitmap[i] = 3248 (24)
+ free_bitmap[i] = 3272 (24)
+ free_bitmap[i] = 3296 (24)
+ free_bitmap[i] = 3320 (24)
+ free_bitmap[i] = 3344 (24)
+ free_bitmap[i] = 3368 (24)
+ free_bitmap[i] = 3392 (24)
+ free_bitmap[i] = 3416 (24)
+ free_bitmap[i] = 3440 (24)
+ free_bitmap[i] = 3464 (24)
+ free_bitmap[i] = 3488 (24)
+ free_bitmap[i] = 3512 (24)
+ free_bitmap[i] = 3536 (24)
+ free_bitmap[i] = 3560 (24)
+ free_bitmap[i] = 3584 (24)
+
+sizeof(ocfs_delete_log) = 32
+ node_num = 0 (8)
+ ent_del = 8 (8)
+ parent_dirnode_off = 16 (8)
+ flags = 24 (4)
+
+sizeof(ocfs_recovery_log) = 8
+ node_num = 0 (8)
+
+sizeof(ocfs_alloc_log) = 24
+ length = 0 (8)
+ file_off = 8 (8)
+ type = 16 (4)
+ node_num = 20 (4)
+
+sizeof(ocfs_dir_log) = 24
+ orig_off = 0 (8)
+ saved_off = 8 (8)
+ length = 16 (8)
+
+sizeof(ocfs_lock_log) = 7208
+ num_lock_upds = 0 (4)
+ lock_upd[i] = 8 (16)
+ lock_upd[i] = 24 (16)
+ lock_upd[i] = 40 (16)
+ lock_upd[i] = 56 (16)
+ lock_upd[i] = 72 (16)
+ lock_upd[i] = 88 (16)
+ lock_upd[i] = 104 (16)
+ lock_upd[i] = 120 (16)
+ lock_upd[i] = 136 (16)
+ lock_upd[i] = 152 (16)
+ lock_upd[i] = 168 (16)
+ lock_upd[i] = 184 (16)
+ lock_upd[i] = 200 (16)
+ lock_upd[i] = 216 (16)
+ lock_upd[i] = 232 (16)
+ lock_upd[i] = 248 (16)
+ lock_upd[i] = 264 (16)
+ lock_upd[i] = 280 (16)
+ lock_upd[i] = 296 (16)
+ lock_upd[i] = 312 (16)
+ lock_upd[i] = 328 (16)
+ lock_upd[i] = 344 (16)
+ lock_upd[i] = 360 (16)
+ lock_upd[i] = 376 (16)
+ lock_upd[i] = 392 (16)
+ lock_upd[i] = 408 (16)
+ lock_upd[i] = 424 (16)
+ lock_upd[i] = 440 (16)
+ lock_upd[i] = 456 (16)
+ lock_upd[i] = 472 (16)
+ lock_upd[i] = 488 (16)
+ lock_upd[i] = 504 (16)
+ lock_upd[i] = 520 (16)
+ lock_upd[i] = 536 (16)
+ lock_upd[i] = 552 (16)
+ lock_upd[i] = 568 (16)
+ lock_upd[i] = 584 (16)
+ lock_upd[i] = 600 (16)
+ lock_upd[i] = 616 (16)
+ lock_upd[i] = 632 (16)
+ lock_upd[i] = 648 (16)
+ lock_upd[i] = 664 (16)
+ lock_upd[i] = 680 (16)
+ lock_upd[i] = 696 (16)
+ lock_upd[i] = 712 (16)
+ lock_upd[i] = 728 (16)
+ lock_upd[i] = 744 (16)
+ lock_upd[i] = 760 (16)
+ lock_upd[i] = 776 (16)
+ lock_upd[i] = 792 (16)
+ lock_upd[i] = 808 (16)
+ lock_upd[i] = 824 (16)
+ lock_upd[i] = 840 (16)
+ lock_upd[i] = 856 (16)
+ lock_upd[i] = 872 (16)
+ lock_upd[i] = 888 (16)
+ lock_upd[i] = 904 (16)
+ lock_upd[i] = 920 (16)
+ lock_upd[i] = 936 (16)
+ lock_upd[i] = 952 (16)
+ lock_upd[i] = 968 (16)
+ lock_upd[i] = 984 (16)
+ lock_upd[i] = 1000 (16)
+ lock_upd[i] = 1016 (16)
+ lock_upd[i] = 1032 (16)
+ lock_upd[i] = 1048 (16)
+ lock_upd[i] = 1064 (16)
+ lock_upd[i] = 1080 (16)
+ lock_upd[i] = 1096 (16)
+ lock_upd[i] = 1112 (16)
+ lock_upd[i] = 1128 (16)
+ lock_upd[i] = 1144 (16)
+ lock_upd[i] = 1160 (16)
+ lock_upd[i] = 1176 (16)
+ lock_upd[i] = 1192 (16)
+ lock_upd[i] = 1208 (16)
+ lock_upd[i] = 1224 (16)
+ lock_upd[i] = 1240 (16)
+ lock_upd[i] = 1256 (16)
+ lock_upd[i] = 1272 (16)
+ lock_upd[i] = 1288 (16)
+ lock_upd[i] = 1304 (16)
+ lock_upd[i] = 1320 (16)
+ lock_upd[i] = 1336 (16)
+ lock_upd[i] = 1352 (16)
+ lock_upd[i] = 1368 (16)
+ lock_upd[i] = 1384 (16)
+ lock_upd[i] = 1400 (16)
+ lock_upd[i] = 1416 (16)
+ lock_upd[i] = 1432 (16)
+ lock_upd[i] = 1448 (16)
+ lock_upd[i] = 1464 (16)
+ lock_upd[i] = 1480 (16)
+ lock_upd[i] = 1496 (16)
+ lock_upd[i] = 1512 (16)
+ lock_upd[i] = 1528 (16)
+ lock_upd[i] = 1544 (16)
+ lock_upd[i] = 1560 (16)
+ lock_upd[i] = 1576 (16)
+ lock_upd[i] = 1592 (16)
+ lock_upd[i] = 1608 (16)
+ lock_upd[i] = 1624 (16)
+ lock_upd[i] = 1640 (16)
+ lock_upd[i] = 1656 (16)
+ lock_upd[i] = 1672 (16)
+ lock_upd[i] = 1688 (16)
+ lock_upd[i] = 1704 (16)
+ lock_upd[i] = 1720 (16)
+ lock_upd[i] = 1736 (16)
+ lock_upd[i] = 1752 (16)
+ lock_upd[i] = 1768 (16)
+ lock_upd[i] = 1784 (16)
+ lock_upd[i] = 1800 (16)
+ lock_upd[i] = 1816 (16)
+ lock_upd[i] = 1832 (16)
+ lock_upd[i] = 1848 (16)
+ lock_upd[i] = 1864 (16)
+ lock_upd[i] = 1880 (16)
+ lock_upd[i] = 1896 (16)
+ lock_upd[i] = 1912 (16)
+ lock_upd[i] = 1928 (16)
+ lock_upd[i] = 1944 (16)
+ lock_upd[i] = 1960 (16)
+ lock_upd[i] = 1976 (16)
+ lock_upd[i] = 1992 (16)
+ lock_upd[i] = 2008 (16)
+ lock_upd[i] = 2024 (16)
+ lock_upd[i] = 2040 (16)
+ lock_upd[i] = 2056 (16)
+ lock_upd[i] = 2072 (16)
+ lock_upd[i] = 2088 (16)
+ lock_upd[i] = 2104 (16)
+ lock_upd[i] = 2120 (16)
+ lock_upd[i] = 2136 (16)
+ lock_upd[i] = 2152 (16)
+ lock_upd[i] = 2168 (16)
+ lock_upd[i] = 2184 (16)
+ lock_upd[i] = 2200 (16)
+ lock_upd[i] = 2216 (16)
+ lock_upd[i] = 2232 (16)
+ lock_upd[i] = 2248 (16)
+ lock_upd[i] = 2264 (16)
+ lock_upd[i] = 2280 (16)
+ lock_upd[i] = 2296 (16)
+ lock_upd[i] = 2312 (16)
+ lock_upd[i] = 2328 (16)
+ lock_upd[i] = 2344 (16)
+ lock_upd[i] = 2360 (16)
+ lock_upd[i] = 2376 (16)
+ lock_upd[i] = 2392 (16)
+ lock_upd[i] = 2408 (16)
+ lock_upd[i] = 2424 (16)
+ lock_upd[i] = 2440 (16)
+ lock_upd[i] = 2456 (16)
+ lock_upd[i] = 2472 (16)
+ lock_upd[i] = 2488 (16)
+ lock_upd[i] = 2504 (16)
+ lock_upd[i] = 2520 (16)
+ lock_upd[i] = 2536 (16)
+ lock_upd[i] = 2552 (16)
+ lock_upd[i] = 2568 (16)
+ lock_upd[i] = 2584 (16)
+ lock_upd[i] = 2600 (16)
+ lock_upd[i] = 2616 (16)
+ lock_upd[i] = 2632 (16)
+ lock_upd[i] = 2648 (16)
+ lock_upd[i] = 2664 (16)
+ lock_upd[i] = 2680 (16)
+ lock_upd[i] = 2696 (16)
+ lock_upd[i] = 2712 (16)
+ lock_upd[i] = 2728 (16)
+ lock_upd[i] = 2744 (16)
+ lock_upd[i] = 2760 (16)
+ lock_upd[i] = 2776 (16)
+ lock_upd[i] = 2792 (16)
+ lock_upd[i] = 2808 (16)
+ lock_upd[i] = 2824 (16)
+ lock_upd[i] = 2840 (16)
+ lock_upd[i] = 2856 (16)
+ lock_upd[i] = 2872 (16)
+ lock_upd[i] = 2888 (16)
+ lock_upd[i] = 2904 (16)
+ lock_upd[i] = 2920 (16)
+ lock_upd[i] = 2936 (16)
+ lock_upd[i] = 2952 (16)
+ lock_upd[i] = 2968 (16)
+ lock_upd[i] = 2984 (16)
+ lock_upd[i] = 3000 (16)
+ lock_upd[i] = 3016 (16)
+ lock_upd[i] = 3032 (16)
+ lock_upd[i] = 3048 (16)
+ lock_upd[i] = 3064 (16)
+ lock_upd[i] = 3080 (16)
+ lock_upd[i] = 3096 (16)
+ lock_upd[i] = 3112 (16)
+ lock_upd[i] = 3128 (16)
+ lock_upd[i] = 3144 (16)
+ lock_upd[i] = 3160 (16)
+ lock_upd[i] = 3176 (16)
+ lock_upd[i] = 3192 (16)
+ lock_upd[i] = 3208 (16)
+ lock_upd[i] = 3224 (16)
+ lock_upd[i] = 3240 (16)
+ lock_upd[i] = 3256 (16)
+ lock_upd[i] = 3272 (16)
+ lock_upd[i] = 3288 (16)
+ lock_upd[i] = 3304 (16)
+ lock_upd[i] = 3320 (16)
+ lock_upd[i] = 3336 (16)
+ lock_upd[i] = 3352 (16)
+ lock_upd[i] = 3368 (16)
+ lock_upd[i] = 3384 (16)
+ lock_upd[i] = 3400 (16)
+ lock_upd[i] = 3416 (16)
+ lock_upd[i] = 3432 (16)
+ lock_upd[i] = 3448 (16)
+ lock_upd[i] = 3464 (16)
+ lock_upd[i] = 3480 (16)
+ lock_upd[i] = 3496 (16)
+ lock_upd[i] = 3512 (16)
+ lock_upd[i] = 3528 (16)
+ lock_upd[i] = 3544 (16)
+ lock_upd[i] = 3560 (16)
+ lock_upd[i] = 3576 (16)
+ lock_upd[i] = 3592 (16)
+ lock_upd[i] = 3608 (16)
+ lock_upd[i] = 3624 (16)
+ lock_upd[i] = 3640 (16)
+ lock_upd[i] = 3656 (16)
+ lock_upd[i] = 3672 (16)
+ lock_upd[i] = 3688 (16)
+ lock_upd[i] = 3704 (16)
+ lock_upd[i] = 3720 (16)
+ lock_upd[i] = 3736 (16)
+ lock_upd[i] = 3752 (16)
+ lock_upd[i] = 3768 (16)
+ lock_upd[i] = 3784 (16)
+ lock_upd[i] = 3800 (16)
+ lock_upd[i] = 3816 (16)
+ lock_upd[i] = 3832 (16)
+ lock_upd[i] = 3848 (16)
+ lock_upd[i] = 3864 (16)
+ lock_upd[i] = 3880 (16)
+ lock_upd[i] = 3896 (16)
+ lock_upd[i] = 3912 (16)
+ lock_upd[i] = 3928 (16)
+ lock_upd[i] = 3944 (16)
+ lock_upd[i] = 3960 (16)
+ lock_upd[i] = 3976 (16)
+ lock_upd[i] = 3992 (16)
+ lock_upd[i] = 4008 (16)
+ lock_upd[i] = 4024 (16)
+ lock_upd[i] = 4040 (16)
+ lock_upd[i] = 4056 (16)
+ lock_upd[i] = 4072 (16)
+ lock_upd[i] = 4088 (16)
+ lock_upd[i] = 4104 (16)
+ lock_upd[i] = 4120 (16)
+ lock_upd[i] = 4136 (16)
+ lock_upd[i] = 4152 (16)
+ lock_upd[i] = 4168 (16)
+ lock_upd[i] = 4184 (16)
+ lock_upd[i] = 4200 (16)
+ lock_upd[i] = 4216 (16)
+ lock_upd[i] = 4232 (16)
+ lock_upd[i] = 4248 (16)
+ lock_upd[i] = 4264 (16)
+ lock_upd[i] = 4280 (16)
+ lock_upd[i] = 4296 (16)
+ lock_upd[i] = 4312 (16)
+ lock_upd[i] = 4328 (16)
+ lock_upd[i] = 4344 (16)
+ lock_upd[i] = 4360 (16)
+ lock_upd[i] = 4376 (16)
+ lock_upd[i] = 4392 (16)
+ lock_upd[i] = 4408 (16)
+ lock_upd[i] = 4424 (16)
+ lock_upd[i] = 4440 (16)
+ lock_upd[i] = 4456 (16)
+ lock_upd[i] = 4472 (16)
+ lock_upd[i] = 4488 (16)
+ lock_upd[i] = 4504 (16)
+ lock_upd[i] = 4520 (16)
+ lock_upd[i] = 4536 (16)
+ lock_upd[i] = 4552 (16)
+ lock_upd[i] = 4568 (16)
+ lock_upd[i] = 4584 (16)
+ lock_upd[i] = 4600 (16)
+ lock_upd[i] = 4616 (16)
+ lock_upd[i] = 4632 (16)
+ lock_upd[i] = 4648 (16)
+ lock_upd[i] = 4664 (16)
+ lock_upd[i] = 4680 (16)
+ lock_upd[i] = 4696 (16)
+ lock_upd[i] = 4712 (16)
+ lock_upd[i] = 4728 (16)
+ lock_upd[i] = 4744 (16)
+ lock_upd[i] = 4760 (16)
+ lock_upd[i] = 4776 (16)
+ lock_upd[i] = 4792 (16)
+ lock_upd[i] = 4808 (16)
+ lock_upd[i] = 4824 (16)
+ lock_upd[i] = 4840 (16)
+ lock_upd[i] = 4856 (16)
+ lock_upd[i] = 4872 (16)
+ lock_upd[i] = 4888 (16)
+ lock_upd[i] = 4904 (16)
+ lock_upd[i] = 4920 (16)
+ lock_upd[i] = 4936 (16)
+ lock_upd[i] = 4952 (16)
+ lock_upd[i] = 4968 (16)
+ lock_upd[i] = 4984 (16)
+ lock_upd[i] = 5000 (16)
+ lock_upd[i] = 5016 (16)
+ lock_upd[i] = 5032 (16)
+ lock_upd[i] = 5048 (16)
+ lock_upd[i] = 5064 (16)
+ lock_upd[i] = 5080 (16)
+ lock_upd[i] = 5096 (16)
+ lock_upd[i] = 5112 (16)
+ lock_upd[i] = 5128 (16)
+ lock_upd[i] = 5144 (16)
+ lock_upd[i] = 5160 (16)
+ lock_upd[i] = 5176 (16)
+ lock_upd[i] = 5192 (16)
+ lock_upd[i] = 5208 (16)
+ lock_upd[i] = 5224 (16)
+ lock_upd[i] = 5240 (16)
+ lock_upd[i] = 5256 (16)
+ lock_upd[i] = 5272 (16)
+ lock_upd[i] = 5288 (16)
+ lock_upd[i] = 5304 (16)
+ lock_upd[i] = 5320 (16)
+ lock_upd[i] = 5336 (16)
+ lock_upd[i] = 5352 (16)
+ lock_upd[i] = 5368 (16)
+ lock_upd[i] = 5384 (16)
+ lock_upd[i] = 5400 (16)
+ lock_upd[i] = 5416 (16)
+ lock_upd[i] = 5432 (16)
+ lock_upd[i] = 5448 (16)
+ lock_upd[i] = 5464 (16)
+ lock_upd[i] = 5480 (16)
+ lock_upd[i] = 5496 (16)
+ lock_upd[i] = 5512 (16)
+ lock_upd[i] = 5528 (16)
+ lock_upd[i] = 5544 (16)
+ lock_upd[i] = 5560 (16)
+ lock_upd[i] = 5576 (16)
+ lock_upd[i] = 5592 (16)
+ lock_upd[i] = 5608 (16)
+ lock_upd[i] = 5624 (16)
+ lock_upd[i] = 5640 (16)
+ lock_upd[i] = 5656 (16)
+ lock_upd[i] = 5672 (16)
+ lock_upd[i] = 5688 (16)
+ lock_upd[i] = 5704 (16)
+ lock_upd[i] = 5720 (16)
+ lock_upd[i] = 5736 (16)
+ lock_upd[i] = 5752 (16)
+ lock_upd[i] = 5768 (16)
+ lock_upd[i] = 5784 (16)
+ lock_upd[i] = 5800 (16)
+ lock_upd[i] = 5816 (16)
+ lock_upd[i] = 5832 (16)
+ lock_upd[i] = 5848 (16)
+ lock_upd[i] = 5864 (16)
+ lock_upd[i] = 5880 (16)
+ lock_upd[i] = 5896 (16)
+ lock_upd[i] = 5912 (16)
+ lock_upd[i] = 5928 (16)
+ lock_upd[i] = 5944 (16)
+ lock_upd[i] = 5960 (16)
+ lock_upd[i] = 5976 (16)
+ lock_upd[i] = 5992 (16)
+ lock_upd[i] = 6008 (16)
+ lock_upd[i] = 6024 (16)
+ lock_upd[i] = 6040 (16)
+ lock_upd[i] = 6056 (16)
+ lock_upd[i] = 6072 (16)
+ lock_upd[i] = 6088 (16)
+ lock_upd[i] = 6104 (16)
+ lock_upd[i] = 6120 (16)
+ lock_upd[i] = 6136 (16)
+ lock_upd[i] = 6152 (16)
+ lock_upd[i] = 6168 (16)
+ lock_upd[i] = 6184 (16)
+ lock_upd[i] = 6200 (16)
+ lock_upd[i] = 6216 (16)
+ lock_upd[i] = 6232 (16)
+ lock_upd[i] = 6248 (16)
+ lock_upd[i] = 6264 (16)
+ lock_upd[i] = 6280 (16)
+ lock_upd[i] = 6296 (16)
+ lock_upd[i] = 6312 (16)
+ lock_upd[i] = 6328 (16)
+ lock_upd[i] = 6344 (16)
+ lock_upd[i] = 6360 (16)
+ lock_upd[i] = 6376 (16)
+ lock_upd[i] = 6392 (16)
+ lock_upd[i] = 6408 (16)
+ lock_upd[i] = 6424 (16)
+ lock_upd[i] = 6440 (16)
+ lock_upd[i] = 6456 (16)
+ lock_upd[i] = 6472 (16)
+ lock_upd[i] = 6488 (16)
+ lock_upd[i] = 6504 (16)
+ lock_upd[i] = 6520 (16)
+ lock_upd[i] = 6536 (16)
+ lock_upd[i] = 6552 (16)
+ lock_upd[i] = 6568 (16)
+ lock_upd[i] = 6584 (16)
+ lock_upd[i] = 6600 (16)
+ lock_upd[i] = 6616 (16)
+ lock_upd[i] = 6632 (16)
+ lock_upd[i] = 6648 (16)
+ lock_upd[i] = 6664 (16)
+ lock_upd[i] = 6680 (16)
+ lock_upd[i] = 6696 (16)
+ lock_upd[i] = 6712 (16)
+ lock_upd[i] = 6728 (16)
+ lock_upd[i] = 6744 (16)
+ lock_upd[i] = 6760 (16)
+ lock_upd[i] = 6776 (16)
+ lock_upd[i] = 6792 (16)
+ lock_upd[i] = 6808 (16)
+ lock_upd[i] = 6824 (16)
+ lock_upd[i] = 6840 (16)
+ lock_upd[i] = 6856 (16)
+ lock_upd[i] = 6872 (16)
+ lock_upd[i] = 6888 (16)
+ lock_upd[i] = 6904 (16)
+ lock_upd[i] = 6920 (16)
+ lock_upd[i] = 6936 (16)
+ lock_upd[i] = 6952 (16)
+ lock_upd[i] = 6968 (16)
+ lock_upd[i] = 6984 (16)
+ lock_upd[i] = 7000 (16)
+ lock_upd[i] = 7016 (16)
+ lock_upd[i] = 7032 (16)
+ lock_upd[i] = 7048 (16)
+ lock_upd[i] = 7064 (16)
+ lock_upd[i] = 7080 (16)
+ lock_upd[i] = 7096 (16)
+ lock_upd[i] = 7112 (16)
+ lock_upd[i] = 7128 (16)
+ lock_upd[i] = 7144 (16)
+ lock_upd[i] = 7160 (16)
+ lock_upd[i] = 7176 (16)
+ lock_upd[i] = 7192 (16)
+
+sizeof(ocfs_lock_update) = 16
+ orig_off = 0 (8)
+ new_off = 8 (8)
+
+sizeof(ocfs_bcast_rel_log) = 8
+ lock_id = 0 (8)
+
+sizeof(ocfs_cleanup_record) = 7224
+ log_id = 0 (8)
+ log_type = 8 (4)
+ rec.lock = 16 (7208)
+ rec.alloc = 16 (24)
+ rec.bcast = 16 (8)
+ rec.del = 16 (32)
+ rec.free = 16 (3608)
+
+sizeof(ocfs_log_record) = 48
+ log_id = 0 (8)
+ log_type = 8 (4)
+ rec.dir = 16 (24)
+ rec.alloc = 16 (24)
+ rec.recovery = 16 (8)
+ rec.bcast = 16 (8)
+ rec.del = 16 (32)
+ rec.extent = 16 (16)
+
Added: branches/ocfs-1.0/tools/sizetest/diskstructs.c
===================================================================
--- branches/ocfs-1.0/tools/sizetest/diskstructs.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/diskstructs.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,632 @@
+/*
+ * diskstructs.c
+ *
+ * Prints sizes and offsets of structures and its elements.
+ * Useful to ensure cross platform compatibility.
+ *
+ * Copyright (C) 2003 Oracle Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran, Manish Singh, Wim Coekaerts
+ */
+
+#include "sizetest.h"
+
+bool show_all = false;
+
+void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr)
+{
+ return;
+}
+
+static void print_ocfs_offset_map()
+{
+ ocfs_offset_map s;
+
+ SHOW_SIZEOF(ocfs_offset_map, s);
+ if (show_all) {
+ SHOW_OFFSET(length, s);
+ SHOW_OFFSET(log_disk_off, s);
+ SHOW_OFFSET(actual_disk_off, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_cleanup_record()
+{
+ ocfs_cleanup_record s;
+
+ SHOW_SIZEOF(ocfs_cleanup_record, s);
+ if (show_all) {
+ SHOW_OFFSET(log_id, s);
+ SHOW_OFFSET(log_type, s);;
+ SHOW_OFFSET(rec.lock, s);
+ SHOW_OFFSET(rec.alloc, s);
+ SHOW_OFFSET(rec.bcast, s);
+ SHOW_OFFSET(rec.del, s);
+ SHOW_OFFSET(rec.free, s);
+ printf("\n");
+ }
+}
+
+
+void usage(void)
+{
+ printf("usage: diskstructs [all]\n");
+ return ;
+}
+
+
+static void print_ocfs_alloc_ext()
+{
+ ocfs_alloc_ext s;
+
+ SHOW_SIZEOF(ocfs_alloc_ext, s);
+ if (show_all) {
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(num_bytes, s);
+ SHOW_OFFSET(disk_off, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_publish()
+{
+ ocfs_publish s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_publish, s);
+ if (show_all) {
+ SHOW_OFFSET(time, s);
+ SHOW_OFFSET(vote, s);
+ SHOW_OFFSET(dirty, s);
+ SHOW_OFFSET(vote_type, s);
+ SHOW_OFFSET(vote_map, s);
+ SHOW_OFFSET(publ_seq_num, s);
+ SHOW_OFFSET(dir_ent, s);
+ for (i = 0; i < OCFS_MAXIMUM_NODES; ++i)
+ SHOW_OFFSET(hbm[i], s);
+ SHOW_OFFSET(comm_seq_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_vote()
+{
+ ocfs_vote s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_vote, s);
+ if (show_all) {
+ for (i = 0; i < OCFS_MAXIMUM_NODES; ++i)
+ SHOW_OFFSET(vote[i], s);
+ SHOW_OFFSET(vote_seq_num, s);
+ SHOW_OFFSET(dir_ent, s);
+ SHOW_OFFSET(open_handle, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_file_entry()
+{
+ ocfs_file_entry s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_file_entry, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(local_ext, s);
+ SHOW_OFFSET(next_free_ext, s);
+ SHOW_OFFSET(next_del, s);
+ SHOW_OFFSET(granularity, s);
+ SHOW_OFFSET(filename, s);
+ SHOW_OFFSET(filename_len, s);
+ SHOW_OFFSET(file_size, s);
+ SHOW_OFFSET(alloc_size, s);
+ SHOW_OFFSET(create_time, s);
+ SHOW_OFFSET(modify_time, s);
+ for (i = 0; i < OCFS_MAX_FILE_ENTRY_EXTENTS; ++i)
+ SHOW_OFFSET(extents[i], s);
+ SHOW_OFFSET(dir_node_ptr, s);
+ SHOW_OFFSET(this_sector, s);
+ SHOW_OFFSET(last_ext_ptr, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(link_cnt, s);
+ SHOW_OFFSET(attribs, s);
+ SHOW_OFFSET(prot_bits, s);
+ SHOW_OFFSET(uid, s);
+ SHOW_OFFSET(gid, s);
+ SHOW_OFFSET(dev_major, s);
+ SHOW_OFFSET(dev_minor, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_index_node()
+{
+ ocfs_index_node s;
+
+ SHOW_SIZEOF(ocfs_index_node, s);
+ if (show_all) {
+ SHOW_OFFSET(down_ptr, s);
+ SHOW_OFFSET(file_ent_ptr, s);
+ SHOW_OFFSET(name_len, s);
+ SHOW_OFFSET(name, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_index_hdr()
+{
+ ocfs_index_hdr s;
+
+ SHOW_SIZEOF(ocfs_index_hdr, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(up_tree_ptr, s);
+ SHOW_OFFSET(node_disk_off, s);
+ SHOW_OFFSET(state, s);
+ SHOW_OFFSET(down_ptr, s);
+ SHOW_OFFSET(num_ents, s);
+ SHOW_OFFSET(depth, s);
+ SHOW_OFFSET(num_ent_used, s);
+ SHOW_OFFSET(dir_node_flags, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(reserved, s);
+ SHOW_OFFSET(file_ent, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_dir_node()
+{
+ ocfs_dir_node s;
+
+ SHOW_SIZEOF(ocfs_dir_node, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(alloc_file_off, s);
+ SHOW_OFFSET(alloc_node, s);
+ SHOW_OFFSET(free_node_ptr, s);
+ SHOW_OFFSET(node_disk_off, s);
+ SHOW_OFFSET(next_node_ptr, s);
+ SHOW_OFFSET(indx_node_ptr, s);
+ SHOW_OFFSET(next_del_ent_node, s);
+ SHOW_OFFSET(head_del_ent_node, s);
+ SHOW_OFFSET(first_del, s);
+ SHOW_OFFSET(num_del, s);
+ SHOW_OFFSET(num_ents, s);
+ SHOW_OFFSET(depth, s);
+ SHOW_OFFSET(num_ent_used, s);
+ SHOW_OFFSET(dir_node_flags, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(index_dirty, s);
+ SHOW_OFFSET(bad_off, s);
+ SHOW_OFFSET(reserved, s);
+ SHOW_OFFSET(file_ent, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_extent_group()
+{
+ ocfs_extent_group s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_extent_group, s);
+ if (show_all) {
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(next_free_ext, s);
+ SHOW_OFFSET(curr_sect, s);
+ SHOW_OFFSET(max_sects, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(granularity, s);
+ SHOW_OFFSET(alloc_node, s);
+ SHOW_OFFSET(this_ext, s);
+ SHOW_OFFSET(next_data_ext, s);
+ SHOW_OFFSET(alloc_file_off, s);
+ SHOW_OFFSET(last_ext_ptr, s);
+ SHOW_OFFSET(up_hdr_node_ptr, s);
+ for (i = 0; i < OCFS_MAX_DATA_EXTENTS; ++i)
+ SHOW_OFFSET(extents[i], s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_bitmap_lock()
+{
+ ocfs_bitmap_lock s;
+
+ SHOW_SIZEOF(ocfs_bitmap_lock, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(used_bits, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_vol_disk_hdr()
+{
+ ocfs_vol_disk_hdr s;
+
+ SHOW_SIZEOF(ocfs_vol_disk_hdr, s);
+ if (show_all) {
+ SHOW_OFFSET(minor_version, s);
+ SHOW_OFFSET(major_version, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(mount_point, s);
+ SHOW_OFFSET(serial_num, s);
+ SHOW_OFFSET(device_size, s);
+ SHOW_OFFSET(start_off, s);
+ SHOW_OFFSET(bitmap_off, s);
+ SHOW_OFFSET(publ_off, s);
+ SHOW_OFFSET(vote_off, s);
+ SHOW_OFFSET(root_bitmap_off, s);
+ SHOW_OFFSET(data_start_off, s);
+ SHOW_OFFSET(root_bitmap_size, s);
+ SHOW_OFFSET(root_off, s);
+ SHOW_OFFSET(root_size, s);
+ SHOW_OFFSET(cluster_size, s);
+ SHOW_OFFSET(num_nodes, s);
+ SHOW_OFFSET(num_clusters, s);
+ SHOW_OFFSET(dir_node_size, s);
+ SHOW_OFFSET(file_node_size, s);
+ SHOW_OFFSET(internal_off, s);
+ SHOW_OFFSET(node_cfg_off, s);
+ SHOW_OFFSET(node_cfg_size, s);
+ SHOW_OFFSET(new_cfg_off, s);
+ SHOW_OFFSET(prot_bits, s);
+ SHOW_OFFSET(uid, s);
+ SHOW_OFFSET(gid, s);
+ SHOW_OFFSET(excl_mount, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_disk_lock()
+{
+ ocfs_disk_lock s;
+
+ SHOW_SIZEOF(ocfs_disk_lock, s);
+ if (show_all) {
+ SHOW_OFFSET(curr_master, s);
+ SHOW_OFFSET(file_lock, s);
+ SHOW_OFFSET(last_write_time, s);
+ SHOW_OFFSET(last_read_time, s);
+ SHOW_OFFSET(writer_node_num, s);
+ SHOW_OFFSET(reader_node_num, s);
+ SHOW_OFFSET(oin_node_map, s);
+ SHOW_OFFSET(dlock_seq_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_vol_label()
+{
+ ocfs_vol_label s;
+
+ SHOW_SIZEOF(ocfs_vol_label, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(label, s);
+ SHOW_OFFSET(label_len, s);
+ SHOW_OFFSET(vol_id, s);
+ SHOW_OFFSET(vol_id_len, s);
+ SHOW_OFFSET(cluster_name, s);
+ SHOW_OFFSET(cluster_name_len, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_ipc_config_info()
+{
+ ocfs_ipc_config_info s;
+
+ SHOW_SIZEOF(ocfs_ipc_config_info, s);
+ if (show_all) {
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(ip_addr, s);
+ SHOW_OFFSET(ip_port, s);
+ SHOW_OFFSET(ip_mask, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_guid()
+{
+ ocfs_guid s;
+
+ SHOW_SIZEOF(ocfs_guid, s);
+ if (show_all) {
+ SHOW_OFFSET(guid, s);
+ SHOW_OFFSET(id.host_id, s);
+ SHOW_OFFSET(id.mac_id, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_disk_node_config_info()
+{
+ ocfs_disk_node_config_info s;
+
+ SHOW_SIZEOF(ocfs_disk_node_config_info, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(node_name, s);
+ SHOW_OFFSET(guid, s);
+ SHOW_OFFSET(ipc_config, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_node_config_hdr()
+{
+ ocfs_node_config_hdr s;
+
+ SHOW_SIZEOF(ocfs_node_config_hdr, s);
+ if (show_all) {
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(version, s);
+ SHOW_OFFSET(num_nodes, s);
+ SHOW_OFFSET(last_node, s);
+ SHOW_OFFSET(cfg_seq_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_cdsl()
+{
+ ocfs_cdsl s;
+
+ SHOW_SIZEOF(ocfs_cdsl, s);
+ if (show_all) {
+ SHOW_OFFSET(name, s);
+ SHOW_OFFSET(flags, s);
+ SHOW_OFFSET(operation, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_free_bitmap()
+{
+ ocfs_free_bitmap s;
+
+ SHOW_SIZEOF(ocfs_free_bitmap, s);
+ if (show_all) {
+ SHOW_OFFSET(length, s);
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(node_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_free_extent_log()
+{
+ ocfs_free_extent_log s;
+
+ SHOW_SIZEOF(ocfs_free_extent_log, s);
+ if (show_all) {
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(disk_off, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_free_log()
+{
+ ocfs_free_log s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_free_log, s);
+ if (show_all) {
+ SHOW_OFFSET(num_free_upds, s);
+ for (i = 0; i < FREE_LOG_SIZE; ++i)
+ SHOW_OFFSET(free_bitmap[i], s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_delete_log()
+{
+ ocfs_delete_log s;
+
+ SHOW_SIZEOF(ocfs_delete_log, s);
+ if (show_all) {
+ SHOW_OFFSET(node_num, s);
+ SHOW_OFFSET(ent_del, s);
+ SHOW_OFFSET(parent_dirnode_off, s);
+ SHOW_OFFSET(flags, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_recovery_log()
+{
+ ocfs_recovery_log s;
+
+ SHOW_SIZEOF(ocfs_recovery_log, s);
+ if (show_all) {
+ SHOW_OFFSET(node_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_alloc_log()
+{
+ ocfs_alloc_log s;
+
+ SHOW_SIZEOF(ocfs_alloc_log, s);
+ if (show_all) {
+ SHOW_OFFSET(length, s);
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(node_num, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_dir_log()
+{
+ ocfs_dir_log s;
+
+ SHOW_SIZEOF(ocfs_dir_log, s);
+ if (show_all) {
+ SHOW_OFFSET(orig_off, s);
+ SHOW_OFFSET(saved_off, s);
+ SHOW_OFFSET(length, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_lock_update()
+{
+ ocfs_lock_update s;
+
+ SHOW_SIZEOF(ocfs_lock_update, s);
+ if (show_all) {
+ SHOW_OFFSET(orig_off, s);
+ SHOW_OFFSET(new_off, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_lock_log()
+{
+ ocfs_lock_log s;
+ int i;
+
+ SHOW_SIZEOF(ocfs_lock_log, s);
+ if (show_all) {
+ SHOW_OFFSET(num_lock_upds, s);
+ for (i = 0; i < LOCK_UPDATE_LOG_SIZE; ++i)
+ SHOW_OFFSET(lock_upd[i], s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_bcast_rel_log()
+{
+ ocfs_bcast_rel_log s;
+
+ SHOW_SIZEOF(ocfs_bcast_rel_log, s);
+ if (show_all) {
+ SHOW_OFFSET(lock_id, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_log_record()
+{
+ ocfs_log_record s;
+
+ SHOW_SIZEOF(ocfs_log_record, s);
+ if (show_all) {
+ SHOW_OFFSET(log_id, s);
+ SHOW_OFFSET(log_type, s);
+ SHOW_OFFSET(rec.dir, s);
+ SHOW_OFFSET(rec.alloc, s);
+ SHOW_OFFSET(rec.recovery, s);
+ SHOW_OFFSET(rec.bcast, s);
+ SHOW_OFFSET(rec.del, s);
+ SHOW_OFFSET(rec.extent, s);
+ printf("\n");
+ }
+}
+
+
+int main(int argc, char **argv)
+{
+ if (argc > 1) {
+ if (!strncasecmp(*++argv, "all", 3))
+ show_all = true;
+ else {
+ usage();
+ exit (1);
+ }
+ }
+
+ print_ocfs_alloc_ext();
+ print_ocfs_publish();
+ print_ocfs_vote();
+ print_ocfs_file_entry();
+ print_ocfs_index_node();
+ print_ocfs_index_hdr();
+ print_ocfs_dir_node();
+ print_ocfs_extent_group();
+ print_ocfs_bitmap_lock();
+
+ print_ocfs_offset_map();
+
+ print_ocfs_vol_disk_hdr();
+ print_ocfs_disk_lock();
+ print_ocfs_vol_label();
+ print_ocfs_ipc_config_info();
+ print_ocfs_guid();
+ print_ocfs_disk_node_config_info();
+ print_ocfs_node_config_hdr();
+ print_ocfs_cdsl();
+
+ print_ocfs_free_bitmap();
+ print_ocfs_free_extent_log();
+ print_ocfs_free_log();
+ print_ocfs_delete_log();
+ print_ocfs_recovery_log();
+ print_ocfs_alloc_log();
+ print_ocfs_dir_log();
+ print_ocfs_lock_log();
+ print_ocfs_lock_update();
+ print_ocfs_bcast_rel_log();
+ print_ocfs_cleanup_record();
+ print_ocfs_log_record();
+
+ return 0;
+} /* main */
Added: branches/ocfs-1.0/tools/sizetest/net.txt
===================================================================
--- branches/ocfs-1.0/tools/sizetest/net.txt 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/net.txt 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,24 @@
+sizeof(ocfs_dlm_msg_hdr) = 24
+ lock_id = 0 (8)
+ flags = 8 (4)
+ lock_seq_num = 12 (8)
+ open_handle = 20 (1)
+
+sizeof(ocfs_dlm_reply_master) = 28
+ h = 0 (24)
+ status = 24 (4)
+
+sizeof(ocfs_dlm_disk_vote_reply) = 28
+ h = 0 (24)
+ status = 24 (4)
+
+sizeof(ocfs_dlm_msg) = 44
+ magic = 0 (4)
+ msg_len = 4 (4)
+ vol_id = 8 (16)
+ src_node = 24 (4)
+ dst_node = 28 (4)
+ msg_type = 32 (4)
+ check_sum = 36 (4)
+ msg_buf = 40 (1)
+
Added: branches/ocfs-1.0/tools/sizetest/netstructs.c
===================================================================
--- branches/ocfs-1.0/tools/sizetest/netstructs.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/netstructs.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,120 @@
+/*
+ * netstructs.c
+ *
+ * Prints sizes and offsets of structures and its elements.
+ * Useful to ensure cross platform compatibility.
+ *
+ * Copyright (C) 2003 Oracle Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran, Manish Singh, Wim Coekaerts
+ */
+
+#include "sizetest.h"
+
+bool show_all = false;
+
+void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr)
+{
+ return;
+}
+
+void usage(void)
+{
+ printf("usage: netstructs [all]\n");
+ return ;
+}
+
+
+static void print_ocfs_dlm_msg_hdr()
+{
+ ocfs_dlm_msg_hdr s;
+
+ SHOW_SIZEOF(ocfs_dlm_msg_hdr, s);
+ if (show_all) {
+ SHOW_OFFSET(lock_id, s);
+ SHOW_OFFSET(flags, s);
+ SHOW_OFFSET(lock_seq_num, s);
+ SHOW_OFFSET(open_handle, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_dlm_reply_master()
+{
+ ocfs_dlm_reply_master s;
+
+ SHOW_SIZEOF(ocfs_dlm_reply_master, s);
+ if (show_all) {
+ SHOW_OFFSET(h, s);
+ SHOW_OFFSET(status, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_dlm_disk_vote_reply()
+{
+ ocfs_dlm_disk_vote_reply s;
+
+ SHOW_SIZEOF(ocfs_dlm_disk_vote_reply, s);
+ if (show_all) {
+ SHOW_OFFSET(h, s);
+ SHOW_OFFSET(status, s);
+ printf("\n");
+ }
+}
+
+
+static void print_ocfs_dlm_msg()
+{
+ ocfs_dlm_msg s;
+
+ SHOW_SIZEOF(ocfs_dlm_msg, s);
+ if (show_all) {
+ SHOW_OFFSET(magic, s);
+ SHOW_OFFSET(msg_len, s);
+ SHOW_OFFSET(vol_id, s);
+ SHOW_OFFSET(src_node, s);
+ SHOW_OFFSET(dst_node, s);
+ SHOW_OFFSET(msg_type, s);
+ SHOW_OFFSET(check_sum, s);
+ SHOW_OFFSET(msg_buf, s);
+ printf("\n");
+ }
+}
+
+
+int main(int argc, char **argv)
+{
+ if (argc > 1) {
+ if (!strncasecmp(*++argv, "all", 3))
+ show_all = true;
+ else {
+ usage();
+ exit (1);
+ }
+ }
+
+ print_ocfs_dlm_msg_hdr();
+ print_ocfs_dlm_reply_master();
+ print_ocfs_dlm_disk_vote_reply();
+ print_ocfs_dlm_msg();
+
+ return 0;
+} /* main */
Modified: branches/ocfs-1.0/tools/sizetest/sizetest.c
===================================================================
--- branches/ocfs-1.0/tools/sizetest/sizetest.c 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/sizetest.c 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,359 +1,950 @@
-#include "ocfs.h"
-
-#ifdef USE_HEX
-#define NUMFORMAT "0x%x"
-#else
-#define NUMFORMAT "%d"
-#endif
-
-
-void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr)
-{
- return;
-}
-
-#define SHOW_SIZEOF(x,y) printf("sizeof("#x")="NUMFORMAT"\n", sizeof(##y))
-#define SHOW_OFFSET(x,y) printf(" "#x"="NUMFORMAT"\n", (void *)&(##y.##x)-(void *)&##y)
-
-static void print_ocfs_lock_res()
-{
- ocfs_lock_res i;
- SHOW_SIZEOF(ocfs_lock_res, i);
-}
-
-static void print_ocfs_log_record()
-{
- ocfs_log_record i;
- SHOW_SIZEOF(ocfs_log_record, i);
-}
-
-static void print_ocfs_offset_map()
-{
- ocfs_offset_map i;
- SHOW_SIZEOF(ocfs_offset_map, i);
-}
-
-static void print_ocfs_io_runs()
-{
- ocfs_io_runs i;
- SHOW_SIZEOF(ocfs_io_runs, i);
-}
-
-static void print_ocfs_alloc_ext()
-{
- ocfs_alloc_ext i;
- SHOW_SIZEOF(ocfs_alloc_ext, i);
-}
-
-static void print_ocfs_extent_group()
-{
- ocfs_extent_group i;
- SHOW_SIZEOF(ocfs_extent_group, i);
-}
-
-static void print_ocfs_inode_offsets()
-{
- ocfs_inode i;
- SHOW_SIZEOF(ocfs_inode, i);
- SHOW_OFFSET(main_res, i);
-}
-
-static void print_ocfs_dlm_reply_master_offsets()
-{
- ocfs_dlm_reply_master d;
- SHOW_SIZEOF(ocfs_dlm_reply_master, d);
-}
-
-static void print_ocfs_dlm_msg_offsets()
-{
- ocfs_dlm_msg d;
- SHOW_SIZEOF(ocfs_dlm_msg, d);
-}
-
-static void print_ocfs_cleanup_record_offsets()
-{
- ocfs_cleanup_record c;
- SHOW_SIZEOF(ocfs_cleanup_record, c);
-}
-
-static void print_ocfs_global_ctxt_offsets()
-{
- ocfs_global_ctxt c;
- SHOW_SIZEOF(ocfs_global_ctxt, c);
- SHOW_OFFSET(obj_id, c);
- SHOW_OFFSET(res, c);
- SHOW_OFFSET(osb_next, c);
- SHOW_OFFSET(oin_cache, c);
- SHOW_OFFSET(ofile_cache, c);
- SHOW_OFFSET(fe_cache, c);
- SHOW_OFFSET(lockres_cache, c);
- SHOW_OFFSET(flags, c);
- SHOW_OFFSET(node_name, c);
- SHOW_OFFSET(cluster_name, c);
- SHOW_OFFSET(comm_info, c);
- SHOW_OFFSET(flush_event, c);
- SHOW_OFFSET(hbm, c);
-}
-
-static void print_ocfs_super_offsets()
-{
- ocfs_super s;
- SHOW_SIZEOF(ocfs_super, s);
- SHOW_OFFSET(obj_id, s);
- SHOW_OFFSET(osb_res, s);
- SHOW_OFFSET(osb_next, s);
- SHOW_OFFSET(osb_id, s);
- SHOW_OFFSET(complete, s);
- SHOW_OFFSET(dlm_task, s);
- SHOW_OFFSET(osb_flags, s);
- SHOW_OFFSET(file_open_cnt, s);
- SHOW_OFFSET(publ_map, s);
- SHOW_OFFSET(root_sect_node, s);
- SHOW_OFFSET(cache_lock_list, s);
- SHOW_OFFSET(sb, s);
- SHOW_OFFSET(oin_root_dir, s);
- SHOW_OFFSET(vol_layout, s);
- SHOW_OFFSET(vol_node_map, s);
- SHOW_OFFSET(node_cfg_info, s);
- SHOW_OFFSET(cfg_seq_num, s);
- SHOW_OFFSET(cfg_initialized, s);
- SHOW_OFFSET(num_cfg_nodes, s);
- SHOW_OFFSET(node_num, s);
- SHOW_OFFSET(hbm, s);
- SHOW_OFFSET(hbt, s);
- SHOW_OFFSET(log_disk_off, s);
- SHOW_OFFSET(log_meta_disk_off, s);
- SHOW_OFFSET(log_file_size, s);
- SHOW_OFFSET(sect_size, s);
- SHOW_OFFSET(needs_flush, s);
- SHOW_OFFSET(commit_cache_exec, s);
- SHOW_OFFSET(map_lock, s);
- SHOW_OFFSET(metadata_map, s);
- SHOW_OFFSET(trans_map, s);
- SHOW_OFFSET(cluster_bitmap, s);
- SHOW_OFFSET(max_dir_node_ent, s);
- SHOW_OFFSET(vol_state, s);
- SHOW_OFFSET(curr_trans_id, s);
- SHOW_OFFSET(trans_in_progress, s);
- SHOW_OFFSET(log_lock, s);
- SHOW_OFFSET(recovery_lock, s);
- SHOW_OFFSET(node_recovering, s);
- SHOW_OFFSET(vol_alloc_lock, s);
- SHOW_OFFSET(lock_timer, s);
- SHOW_OFFSET(lock_stop, s);
- SHOW_OFFSET(lock_event, s);
- SHOW_OFFSET(cache_fs, s);
-}
-
-static void print_ocfs_lock_res_offsets()
-{
- ocfs_lock_res l;
- SHOW_SIZEOF(ocfs_lock_res, l);
- SHOW_OFFSET(signature, l);
- SHOW_OFFSET(lock_type, l);
- SHOW_OFFSET(ref_cnt, l);
- SHOW_OFFSET(master_node_num, l);
- SHOW_OFFSET(last_upd_seq_num, l);
- SHOW_OFFSET(last_lock_upd, l);
- SHOW_OFFSET(sector_num, l);
- SHOW_OFFSET(oin_openmap, l);
- SHOW_OFFSET(in_use, l);
- SHOW_OFFSET(thread_id, l);
- SHOW_OFFSET(cache_list, l);
- SHOW_OFFSET(in_cache_list, l);
- SHOW_OFFSET(lock_state, l);
- SHOW_OFFSET(oin, l);
- SHOW_OFFSET(lock_mutex, l);
- SHOW_OFFSET(voted_event, l);
- SHOW_OFFSET(req_vote_map, l);
- SHOW_OFFSET(got_vote_map, l);
- SHOW_OFFSET(vote_status, l);
- SHOW_OFFSET(last_write_time, l);
- SHOW_OFFSET(last_read_time, l);
- SHOW_OFFSET(writer_node_num, l);
- SHOW_OFFSET(reader_node_num, l);
-}
-
-static void print_superops_offsets()
-{
- struct super_operations s;
- SHOW_SIZEOF(struct super_operations, s);
- SHOW_OFFSET(read_inode, s);
- SHOW_OFFSET(read_inode2, s);
- SHOW_OFFSET(dirty_inode, s);
- SHOW_OFFSET(write_inode, s);
- SHOW_OFFSET(put_inode, s);
- SHOW_OFFSET(delete_inode, s);
- SHOW_OFFSET(put_super, s);
- SHOW_OFFSET(write_super, s);
- SHOW_OFFSET(write_super_lockfs, s);
- SHOW_OFFSET(unlockfs, s);
- SHOW_OFFSET(statfs, s);
- SHOW_OFFSET(remount_fs, s);
- SHOW_OFFSET(clear_inode, s);
- SHOW_OFFSET(umount_begin, s);
-}
-
-static void print_super_offsets()
-{
- struct super_block s;
- SHOW_SIZEOF(struct super_block, s);
- SHOW_OFFSET(s_op, s);
- SHOW_OFFSET(s_list, s);
- SHOW_OFFSET(s_dev, s);
- SHOW_OFFSET(s_blocksize, s);
- SHOW_OFFSET(s_blocksize_bits, s);
- SHOW_OFFSET(s_dirt, s);
- SHOW_OFFSET(s_maxbytes, s);
- SHOW_OFFSET(s_type, s);
- SHOW_OFFSET(s_op, s);
- SHOW_OFFSET(dq_op, s);
- SHOW_OFFSET(s_flags, s);
- SHOW_OFFSET(s_magic, s);
- SHOW_OFFSET(s_root, s);
- SHOW_OFFSET(s_umount, s);
- SHOW_OFFSET(s_lock, s);
- SHOW_OFFSET(s_count, s);
- SHOW_OFFSET(s_active, s);
- SHOW_OFFSET(s_dirty, s);
- SHOW_OFFSET(s_locked_inodes, s);
- SHOW_OFFSET(s_files, s);
- SHOW_OFFSET(s_bdev, s);
- SHOW_OFFSET(s_instances, s);
- SHOW_OFFSET(s_dquot, s);
- SHOW_OFFSET(u, s);
-}
-
-static void print_filp_offsets()
-{
- struct file f;
- SHOW_SIZEOF(struct file, f);
- SHOW_OFFSET(f_list, f);
- SHOW_OFFSET(f_dentry, f);
- SHOW_OFFSET(f_vfsmnt, f);
- SHOW_OFFSET(f_op, f);
- SHOW_OFFSET(f_count, f);
- SHOW_OFFSET(f_flags, f);
- SHOW_OFFSET(f_mode, f);
- SHOW_OFFSET(f_pos, f);
- SHOW_OFFSET(f_reada, f);
- SHOW_OFFSET(f_ramax, f);
- SHOW_OFFSET(f_raend, f);
- SHOW_OFFSET(f_ralen, f);
- SHOW_OFFSET(f_rawin, f);
- SHOW_OFFSET(f_owner, f);
- SHOW_OFFSET(f_uid, f);
- SHOW_OFFSET(f_gid, f);
- SHOW_OFFSET(f_error, f);
- SHOW_OFFSET(f_version, f);
- SHOW_OFFSET(private_data, f);
- SHOW_OFFSET(f_iobuf, f);
- SHOW_OFFSET(f_iobuf_lock, f);
-}
-
-static void print_inode_offsets()
-{
- struct inode ino;
-
- SHOW_SIZEOF(struct inode, ino);
- SHOW_OFFSET(i_hash, ino);
- SHOW_OFFSET(i_list, ino);
- SHOW_OFFSET(i_dentry, ino);
- SHOW_OFFSET(i_dirty_buffers, ino);
- SHOW_OFFSET(i_dirty_data_buffers, ino);
- SHOW_OFFSET(i_ino, ino);
- SHOW_OFFSET(i_count, ino);
- SHOW_OFFSET(i_dev, ino);
- SHOW_OFFSET(i_mode, ino);
- SHOW_OFFSET(i_nlink, ino);
- SHOW_OFFSET(i_uid, ino);
- SHOW_OFFSET(i_gid, ino);
- SHOW_OFFSET(i_rdev, ino);
- SHOW_OFFSET(i_size, ino);
- SHOW_OFFSET(i_atime, ino);
- SHOW_OFFSET(i_mtime, ino);
- SHOW_OFFSET(i_ctime, ino);
- SHOW_OFFSET(i_blksize, ino);
- SHOW_OFFSET(i_blocks, ino);
- SHOW_OFFSET(i_version, ino);
- SHOW_OFFSET(i_bytes, ino);
- SHOW_OFFSET(i_sem, ino);
- SHOW_OFFSET(i_truncate_sem, ino);
- SHOW_OFFSET(i_zombie, ino);
- SHOW_OFFSET(i_op, ino);
- SHOW_OFFSET(i_fop, ino);
- SHOW_OFFSET(i_sb, ino);
- SHOW_OFFSET(i_wait, ino);
- SHOW_OFFSET(i_flock, ino);
- SHOW_OFFSET(i_mapping, ino);
- SHOW_OFFSET(i_data, ino);
- SHOW_OFFSET(i_dquot, ino);
- SHOW_OFFSET(i_devices, ino);
- SHOW_OFFSET(i_pipe, ino);
- SHOW_OFFSET(i_bdev, ino);
- SHOW_OFFSET(i_cdev, ino);
- SHOW_OFFSET(i_dnotify_mask, ino);
- SHOW_OFFSET(i_dnotify, ino);
- SHOW_OFFSET(i_state, ino);
- SHOW_OFFSET(i_flags, ino);
- SHOW_OFFSET(i_sock, ino);
- SHOW_OFFSET(i_writecount, ino);
- SHOW_OFFSET(i_attr_flags, ino);
- SHOW_OFFSET(i_generation, ino);
- SHOW_OFFSET(u.generic_ip, ino);
-}
-
-static void print_dentry_offsets()
-{
- struct qstr qs;
- struct dentry den;
-
- SHOW_SIZEOF(struct dentry, den);
- SHOW_OFFSET(d_count, den);
- SHOW_OFFSET(d_flags, den);
- SHOW_OFFSET(d_inode, den);
- SHOW_OFFSET(d_parent, den);
- SHOW_OFFSET(d_hash, den);
- SHOW_OFFSET(d_lru, den);
- SHOW_OFFSET(d_child, den);
- SHOW_OFFSET(d_subdirs, den);
- SHOW_OFFSET(d_alias, den);
- SHOW_OFFSET(d_mounted, den);
- SHOW_OFFSET(d_name, den);
- SHOW_OFFSET(d_time, den);
- SHOW_OFFSET(d_op, den);
- SHOW_OFFSET(d_sb, den);
- SHOW_OFFSET(d_vfs_flags, den);
- SHOW_OFFSET(d_fsdata, den);
- SHOW_OFFSET(d_iname, den);
-
- SHOW_SIZEOF(struct qstr, qs);
- SHOW_OFFSET(name, qs);
- SHOW_OFFSET(len, qs);
- SHOW_OFFSET(hash, qs);
-}
-
-int main(int argc, char **argv)
-{
- print_inode_offsets();
- print_dentry_offsets();
- print_filp_offsets();
- print_super_offsets();
- print_superops_offsets();
- print_ocfs_lock_res_offsets();
- print_ocfs_super_offsets();
- print_ocfs_global_ctxt_offsets();
- print_ocfs_cleanup_record_offsets();
- print_ocfs_dlm_reply_master_offsets();
- print_ocfs_dlm_msg_offsets();
- print_ocfs_inode_offsets();
- print_ocfs_extent_group();
- print_ocfs_alloc_ext();
- print_ocfs_io_runs();
- print_ocfs_offset_map();
- print_ocfs_log_record();
- print_ocfs_lock_res();
-
- return 0;
-}
-
+/*
+ * sizetest.c
+ *
+ * Prints sizes and offsets of structures and its elements.
+ * Useful to ensure cross platform compatibility.
+ *
+ * Copyright (C) 2003 Oracle Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran, Manish Singh, Wim Coekaerts
+ */
+
+#include "sizetest.h"
+
+bool show_all = false;
+
+void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr)
+{
+ return;
+}
+
+static void print_ocfs_extent_map()
+{
+ ocfs_extent_map i;
+ SHOW_SIZEOF(ocfs_extent_map, i);
+}
+
+static void print_ocfs_offset_map()
+{
+ ocfs_offset_map i;
+ SHOW_SIZEOF(ocfs_offset_map, i);
+ SHOW_OFFSET(length, i);
+ SHOW_OFFSET(log_disk_off, i);
+ SHOW_OFFSET(actual_disk_off, i);
+}
+
+static void print_ocfs_io_runs()
+{
+ ocfs_io_runs i;
+ SHOW_SIZEOF(ocfs_io_runs, i);
+}
+
+static void print_ocfs_inode_offsets()
+{
+ ocfs_inode i;
+ SHOW_SIZEOF(ocfs_inode, i);
+
+ if (show_all)
+ SHOW_OFFSET(main_res, i);
+}
+
+static void print_ocfs_dlm_reply_master_offsets()
+{
+ ocfs_dlm_reply_master d;
+ SHOW_SIZEOF(ocfs_dlm_reply_master, d);
+}
+
+static void print_ocfs_dlm_msg_offsets()
+{
+ ocfs_dlm_msg d;
+ SHOW_SIZEOF(ocfs_dlm_msg, d);
+}
+
+static void print_ocfs_cleanup_record_offsets()
+{
+ ocfs_cleanup_record c;
+ SHOW_SIZEOF(ocfs_cleanup_record, c);
+}
+
+static void print_ocfs_global_ctxt_offsets()
+{
+ ocfs_global_ctxt c;
+
+ SHOW_SIZEOF(ocfs_global_ctxt, c);
+
+ if (show_all) {
+ SHOW_OFFSET(obj_id, c);
+ SHOW_OFFSET(res, c);
+ SHOW_OFFSET(osb_next, c);
+ SHOW_OFFSET(oin_cache, c);
+ SHOW_OFFSET(ofile_cache, c);
+ SHOW_OFFSET(fe_cache, c);
+ SHOW_OFFSET(lockres_cache, c);
+ SHOW_OFFSET(flags, c);
+ SHOW_OFFSET(node_name, c);
+ SHOW_OFFSET(cluster_name, c);
+ SHOW_OFFSET(comm_info, c);
+ SHOW_OFFSET(hbm, c);
+ }
+}
+
+static void print_ocfs_super_offsets()
+{
+ ocfs_super s;
+
+ SHOW_SIZEOF(ocfs_super, s);
+
+ if (show_all) {
+ SHOW_OFFSET(obj_id, s);
+ SHOW_OFFSET(osb_res, s);
+ SHOW_OFFSET(osb_next, s);
+ SHOW_OFFSET(osb_id, s);
+ SHOW_OFFSET(complete, s);
+ SHOW_OFFSET(dlm_task, s);
+ SHOW_OFFSET(osb_flags, s);
+ SHOW_OFFSET(file_open_cnt, s);
+ SHOW_OFFSET(publ_map, s);
+ SHOW_OFFSET(root_sect_node, s);
+ SHOW_OFFSET(cache_lock_list, s);
+ SHOW_OFFSET(sb, s);
+ SHOW_OFFSET(oin_root_dir, s);
+ SHOW_OFFSET(vol_layout, s);
+ SHOW_OFFSET(vol_node_map, s);
+ SHOW_OFFSET(node_cfg_info, s);
+ SHOW_OFFSET(cfg_seq_num, s);
+ SHOW_OFFSET(cfg_initialized, s);
+ SHOW_OFFSET(num_cfg_nodes, s);
+ SHOW_OFFSET(node_num, s);
+ SHOW_OFFSET(hbm, s);
+ SHOW_OFFSET(hbt, s);
+ SHOW_OFFSET(log_disk_off, s);
+ SHOW_OFFSET(log_meta_disk_off, s);
+ SHOW_OFFSET(log_file_size, s);
+ SHOW_OFFSET(sect_size, s);
+ SHOW_OFFSET(needs_flush, s);
+ SHOW_OFFSET(commit_cache_exec, s);
+ SHOW_OFFSET(map_lock, s);
+ SHOW_OFFSET(metadata_map, s);
+ SHOW_OFFSET(trans_map, s);
+ SHOW_OFFSET(cluster_bitmap, s);
+ SHOW_OFFSET(max_dir_node_ent, s);
+ SHOW_OFFSET(vol_state, s);
+ SHOW_OFFSET(curr_trans_id, s);
+ SHOW_OFFSET(trans_in_progress, s);
+ SHOW_OFFSET(log_lock, s);
+ SHOW_OFFSET(recovery_lock, s);
+ SHOW_OFFSET(node_recovering, s);
+ SHOW_OFFSET(vol_alloc_lock, s);
+ SHOW_OFFSET(lock_timer, s);
+ SHOW_OFFSET(lock_stop, s);
+ SHOW_OFFSET(lock_event, s);
+ SHOW_OFFSET(cache_fs, s);
+ }
+}
+
+static void print_ocfs_lock_res_offsets()
+{
+ ocfs_lock_res l;
+
+ SHOW_SIZEOF(ocfs_lock_res, l);
+
+ if (show_all) {
+ SHOW_OFFSET(signature, l);
+ SHOW_OFFSET(lock_type, l);
+// SHOW_OFFSET(ref_cnt, l);
+ SHOW_OFFSET(master_node_num, l);
+ SHOW_OFFSET(last_upd_seq_num, l);
+ SHOW_OFFSET(last_lock_upd, l);
+ SHOW_OFFSET(sector_num, l);
+ SHOW_OFFSET(oin_openmap, l);
+ SHOW_OFFSET(in_use, l);
+ SHOW_OFFSET(thread_id, l);
+ SHOW_OFFSET(cache_list, l);
+ SHOW_OFFSET(in_cache_list, l);
+ SHOW_OFFSET(lock_state, l);
+ SHOW_OFFSET(oin, l);
+ SHOW_OFFSET(lock_mutex, l);
+ SHOW_OFFSET(voted_event, l);
+ SHOW_OFFSET(req_vote_map, l);
+ SHOW_OFFSET(got_vote_map, l);
+ SHOW_OFFSET(vote_status, l);
+ SHOW_OFFSET(last_write_time, l);
+ SHOW_OFFSET(last_read_time, l);
+ SHOW_OFFSET(writer_node_num, l);
+ SHOW_OFFSET(reader_node_num, l);
+ }
+}
+
+static void print_superops_offsets()
+{
+ struct super_operations s;
+
+ SHOW_SIZEOF(struct super_operations, s);
+
+ if (show_all) {
+ SHOW_OFFSET(read_inode, s);
+ SHOW_OFFSET(read_inode2, s);
+ SHOW_OFFSET(dirty_inode, s);
+ SHOW_OFFSET(write_inode, s);
+ SHOW_OFFSET(put_inode, s);
+ SHOW_OFFSET(delete_inode, s);
+ SHOW_OFFSET(put_super, s);
+ SHOW_OFFSET(write_super, s);
+ SHOW_OFFSET(write_super_lockfs, s);
+ SHOW_OFFSET(unlockfs, s);
+ SHOW_OFFSET(statfs, s);
+ SHOW_OFFSET(remount_fs, s);
+ SHOW_OFFSET(clear_inode, s);
+ SHOW_OFFSET(umount_begin, s);
+ }
+}
+
+static void print_super_offsets()
+{
+ struct super_block s;
+
+ SHOW_SIZEOF(struct super_block, s);
+
+ if (show_all) {
+ SHOW_OFFSET(s_op, s);
+ SHOW_OFFSET(s_list, s);
+ SHOW_OFFSET(s_dev, s);
+ SHOW_OFFSET(s_blocksize, s);
+ SHOW_OFFSET(s_blocksize_bits, s);
+ SHOW_OFFSET(s_dirt, s);
+ SHOW_OFFSET(s_maxbytes, s);
+ SHOW_OFFSET(s_type, s);
+ SHOW_OFFSET(s_op, s);
+ SHOW_OFFSET(dq_op, s);
+ SHOW_OFFSET(s_flags, s);
+ SHOW_OFFSET(s_magic, s);
+ SHOW_OFFSET(s_root, s);
+ SHOW_OFFSET(s_umount, s);
+ SHOW_OFFSET(s_lock, s);
+ SHOW_OFFSET(s_count, s);
+ SHOW_OFFSET(s_active, s);
+ SHOW_OFFSET(s_dirty, s);
+ SHOW_OFFSET(s_locked_inodes, s);
+ SHOW_OFFSET(s_files, s);
+ SHOW_OFFSET(s_bdev, s);
+ SHOW_OFFSET(s_instances, s);
+ SHOW_OFFSET(s_dquot, s);
+ SHOW_OFFSET(u, s);
+ }
+}
+
+static void print_filp_offsets()
+{
+ struct file f;
+
+ SHOW_SIZEOF(struct file, f);
+
+ if (show_all) {
+ SHOW_OFFSET(f_list, f);
+ SHOW_OFFSET(f_dentry, f);
+ SHOW_OFFSET(f_vfsmnt, f);
+ SHOW_OFFSET(f_op, f);
+ SHOW_OFFSET(f_count, f);
+ SHOW_OFFSET(f_flags, f);
+ SHOW_OFFSET(f_mode, f);
+ SHOW_OFFSET(f_pos, f);
+ SHOW_OFFSET(f_reada, f);
+ SHOW_OFFSET(f_ramax, f);
+ SHOW_OFFSET(f_raend, f);
+ SHOW_OFFSET(f_ralen, f);
+ SHOW_OFFSET(f_rawin, f);
+ SHOW_OFFSET(f_owner, f);
+ SHOW_OFFSET(f_uid, f);
+ SHOW_OFFSET(f_gid, f);
+ SHOW_OFFSET(f_error, f);
+ SHOW_OFFSET(f_version, f);
+ SHOW_OFFSET(private_data, f);
+ //SHOW_OFFSET(f_iobuf, f);
+ //SHOW_OFFSET(f_iobuf_lock, f);
+ }
+}
+
+static void print_inode_offsets()
+{
+ struct inode ino;
+
+ SHOW_SIZEOF(struct inode, ino);
+
+ if (show_all) {
+ SHOW_OFFSET(i_hash, ino);
+ SHOW_OFFSET(i_list, ino);
+ SHOW_OFFSET(i_dentry, ino);
+ SHOW_OFFSET(i_dirty_buffers, ino);
+ //SHOW_OFFSET(i_dirty_data_buffers, ino);
+ SHOW_OFFSET(i_ino, ino);
+ SHOW_OFFSET(i_count, ino);
+ SHOW_OFFSET(i_dev, ino);
+ SHOW_OFFSET(i_mode, ino);
+ SHOW_OFFSET(i_nlink, ino);
+ SHOW_OFFSET(i_uid, ino);
+ SHOW_OFFSET(i_gid, ino);
+ SHOW_OFFSET(i_rdev, ino);
+ SHOW_OFFSET(i_size, ino);
+ SHOW_OFFSET(i_atime, ino);
+ SHOW_OFFSET(i_mtime, ino);
+ SHOW_OFFSET(i_ctime, ino);
+ SHOW_OFFSET(i_blksize, ino);
+ SHOW_OFFSET(i_blocks, ino);
+ SHOW_OFFSET(i_version, ino);
+ SHOW_OFFSET(i_bytes, ino);
+ SHOW_OFFSET(i_sem, ino);
+#ifndef __LP64__
+ SHOW_OFFSET(i_truncate_sem, ino);
+#endif
+ SHOW_OFFSET(i_zombie, ino);
+ SHOW_OFFSET(i_op, ino);
+ SHOW_OFFSET(i_fop, ino);
+ SHOW_OFFSET(i_sb, ino);
+ SHOW_OFFSET(i_wait, ino);
+ SHOW_OFFSET(i_flock, ino);
+ SHOW_OFFSET(i_mapping, ino);
+ SHOW_OFFSET(i_data, ino);
+ SHOW_OFFSET(i_dquot, ino);
+ //SHOW_OFFSET(i_devices, ino);
+ SHOW_OFFSET(i_pipe, ino);
+ SHOW_OFFSET(i_bdev, ino);
+ SHOW_OFFSET(i_cdev, ino);
+ SHOW_OFFSET(i_dnotify_mask, ino);
+ SHOW_OFFSET(i_dnotify, ino);
+ SHOW_OFFSET(i_state, ino);
+ SHOW_OFFSET(i_flags, ino);
+ SHOW_OFFSET(i_sock, ino);
+ SHOW_OFFSET(i_writecount, ino);
+ SHOW_OFFSET(i_attr_flags, ino);
+ SHOW_OFFSET(i_generation, ino);
+ SHOW_OFFSET(u.generic_ip, ino);
+ }
+}
+
+static void print_dentry_offsets()
+{
+ struct qstr qs;
+ struct dentry den;
+
+ SHOW_SIZEOF(struct dentry, den);
+
+ if (show_all) {
+ SHOW_OFFSET(d_count, den);
+ SHOW_OFFSET(d_flags, den);
+ SHOW_OFFSET(d_inode, den);
+ SHOW_OFFSET(d_parent, den);
+ SHOW_OFFSET(d_hash, den);
+ SHOW_OFFSET(d_lru, den);
+ SHOW_OFFSET(d_child, den);
+ SHOW_OFFSET(d_subdirs, den);
+ SHOW_OFFSET(d_alias, den);
+ SHOW_OFFSET(d_mounted, den);
+ SHOW_OFFSET(d_name, den);
+ SHOW_OFFSET(d_time, den);
+ SHOW_OFFSET(d_op, den);
+ SHOW_OFFSET(d_sb, den);
+ SHOW_OFFSET(d_vfs_flags, den);
+ SHOW_OFFSET(d_fsdata, den);
+ SHOW_OFFSET(d_iname, den);
+ SHOW_SIZEOF(struct qstr, qs);
+ SHOW_OFFSET(name, qs);
+ SHOW_OFFSET(len, qs);
+ SHOW_OFFSET(hash, qs);
+ }
+}
+
+void usage(void)
+{
+ printf("usage: sizetest [all]\n");
+ return ;
+}
+
+
+static void print_ocfs_alloc_ext()
+{
+ ocfs_alloc_ext s;
+ SHOW_SIZEOF(ocfs_alloc_ext, s);
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(num_bytes, s);
+ SHOW_OFFSET(disk_off, s);
+}
+
+
+static void print_ocfs_publish()
+{
+ ocfs_publish s;
+ SHOW_SIZEOF(ocfs_publish, s);
+ SHOW_OFFSET(time, s);
+ SHOW_OFFSET(vote, s);
+ SHOW_OFFSET(dirty, s);
+ SHOW_OFFSET(vote_type, s);
+ SHOW_OFFSET(vote_map, s);
+ SHOW_OFFSET(publ_seq_num, s);
+ SHOW_OFFSET(dir_ent, s);
+ SHOW_OFFSET(hbm, s);
+ SHOW_OFFSET(comm_seq_num, s);
+}
+
+
+static void print_ocfs_vote()
+{
+ ocfs_vote s;
+ SHOW_SIZEOF(ocfs_vote, s);
+ SHOW_OFFSET(vote, s);
+ SHOW_OFFSET(vote_seq_num, s);
+ SHOW_OFFSET(dir_ent, s);
+ SHOW_OFFSET(open_handle, s);
+}
+
+
+static void print_ocfs_file_entry()
+{
+ ocfs_file_entry s;
+ SHOW_SIZEOF(ocfs_file_entry, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(local_ext, s);
+ SHOW_OFFSET(next_free_ext, s);
+ SHOW_OFFSET(next_del, s);
+ SHOW_OFFSET(granularity, s);
+ SHOW_OFFSET(filename, s);
+ SHOW_OFFSET(filename_len, s);
+ SHOW_OFFSET(file_size, s);
+ SHOW_OFFSET(alloc_size, s);
+ SHOW_OFFSET(create_time, s);
+ SHOW_OFFSET(modify_time, s);
+ SHOW_OFFSET(extents, s);
+ SHOW_OFFSET(dir_node_ptr, s);
+ SHOW_OFFSET(this_sector, s);
+ SHOW_OFFSET(last_ext_ptr, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(link_cnt, s);
+ SHOW_OFFSET(attribs, s);
+ SHOW_OFFSET(prot_bits, s);
+ SHOW_OFFSET(uid, s);
+ SHOW_OFFSET(gid, s);
+ SHOW_OFFSET(dev_major, s);
+ SHOW_OFFSET(dev_minor, s);
+}
+
+
+static void print_ocfs_index_node()
+{
+ ocfs_index_node s;
+ SHOW_SIZEOF(ocfs_index_node, s);
+ SHOW_OFFSET(down_ptr, s);
+ SHOW_OFFSET(file_ent_ptr, s);
+ SHOW_OFFSET(name_len, s);
+ SHOW_OFFSET(name, s);
+}
+
+
+static void print_ocfs_index_hdr()
+{
+ ocfs_index_hdr s;
+ SHOW_SIZEOF(ocfs_index_hdr, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(up_tree_ptr, s);
+ SHOW_OFFSET(node_disk_off, s);
+ SHOW_OFFSET(state, s);
+ SHOW_OFFSET(down_ptr, s);
+ SHOW_OFFSET(num_ents, s);
+ SHOW_OFFSET(depth, s);
+ SHOW_OFFSET(num_ent_used, s);
+ SHOW_OFFSET(dir_node_flags, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(reserved, s);
+ SHOW_OFFSET(file_ent, s);
+}
+
+
+static void print_ocfs_dir_node()
+{
+ ocfs_dir_node s;
+ SHOW_SIZEOF(ocfs_dir_node, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(alloc_file_off, s);
+ SHOW_OFFSET(alloc_node, s);
+ SHOW_OFFSET(free_node_ptr, s);
+ SHOW_OFFSET(node_disk_off, s);
+ SHOW_OFFSET(next_node_ptr, s);
+ SHOW_OFFSET(indx_node_ptr, s);
+ SHOW_OFFSET(next_del_ent_node, s);
+ SHOW_OFFSET(head_del_ent_node, s);
+ SHOW_OFFSET(first_del, s);
+ SHOW_OFFSET(num_del, s);
+ SHOW_OFFSET(num_ents, s);
+ SHOW_OFFSET(depth, s);
+ SHOW_OFFSET(num_ent_used, s);
+ SHOW_OFFSET(dir_node_flags, s);
+ SHOW_OFFSET(sync_flags, s);
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(index_dirty, s);
+ SHOW_OFFSET(bad_off, s);
+ SHOW_OFFSET(reserved, s);
+ SHOW_OFFSET(file_ent, s);
+}
+
+
+static void print_ocfs_vol_node_map()
+{
+ ocfs_vol_node_map s;
+ SHOW_SIZEOF(ocfs_vol_node_map, s);
+ SHOW_OFFSET(time, s);
+ SHOW_OFFSET(scan_time, s);
+ SHOW_OFFSET(scan_rate, s);
+ SHOW_OFFSET(miss_cnt, s);
+ SHOW_OFFSET(dismount, s);
+ SHOW_OFFSET(largest_seq_num, s);
+}
+
+
+static void print_ocfs_vol_layout()
+{
+ ocfs_vol_layout s;
+ SHOW_SIZEOF(ocfs_vol_layout, s);
+ SHOW_OFFSET(start_off, s);
+ SHOW_OFFSET(num_nodes, s);
+ SHOW_OFFSET(cluster_size, s);
+ SHOW_OFFSET(mount_point, s);
+ SHOW_OFFSET(vol_id, s);
+ SHOW_OFFSET(label, s);
+ SHOW_OFFSET(label_len, s);
+ SHOW_OFFSET(size, s);
+ SHOW_OFFSET(root_start_off, s);
+ SHOW_OFFSET(serial_num, s);
+ SHOW_OFFSET(root_size, s);
+ SHOW_OFFSET(publ_sect_off, s);
+ SHOW_OFFSET(vote_sect_off, s);
+ SHOW_OFFSET(root_bitmap_off, s);
+ SHOW_OFFSET(root_bitmap_size, s);
+ SHOW_OFFSET(data_start_off, s);
+ SHOW_OFFSET(num_clusters, s);
+ SHOW_OFFSET(root_int_off, s);
+ SHOW_OFFSET(dir_node_size, s);
+ SHOW_OFFSET(file_node_size, s);
+ SHOW_OFFSET(bitmap_off, s);
+ SHOW_OFFSET(node_cfg_off, s);
+ SHOW_OFFSET(node_cfg_size, s);
+ SHOW_OFFSET(new_cfg_off, s);
+ SHOW_OFFSET(prot_bits, s);
+ SHOW_OFFSET(uid, s);
+ SHOW_OFFSET(gid, s);
+}
+
+
+static void print_ocfs_extent_group()
+{
+ ocfs_extent_group s;
+ SHOW_SIZEOF(ocfs_extent_group, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(next_free_ext, s);
+ SHOW_OFFSET(curr_sect, s);
+ SHOW_OFFSET(max_sects, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(granularity, s);
+ SHOW_OFFSET(alloc_node, s);
+ SHOW_OFFSET(this_ext, s);
+ SHOW_OFFSET(next_data_ext, s);
+ SHOW_OFFSET(alloc_file_off, s);
+ SHOW_OFFSET(last_ext_ptr, s);
+ SHOW_OFFSET(up_hdr_node_ptr, s);
+ SHOW_OFFSET(extents, s);
+}
+
+
+static void print_ocfs_bitmap_lock()
+{
+ ocfs_bitmap_lock s;
+ SHOW_SIZEOF(ocfs_bitmap_lock, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(used_bits, s);
+}
+
+
+static void print_ocfs_vol_disk_hdr()
+{
+ ocfs_vol_disk_hdr s;
+ SHOW_SIZEOF(ocfs_vol_disk_hdr, s);
+ SHOW_OFFSET(minor_version, s);
+ SHOW_OFFSET(major_version, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(mount_point, s);
+ SHOW_OFFSET(serial_num, s);
+ SHOW_OFFSET(device_size, s);
+ SHOW_OFFSET(start_off, s);
+ SHOW_OFFSET(bitmap_off, s);
+ SHOW_OFFSET(publ_off, s);
+ SHOW_OFFSET(vote_off, s);
+ SHOW_OFFSET(root_bitmap_off, s);
+ SHOW_OFFSET(data_start_off, s);
+ SHOW_OFFSET(root_bitmap_size, s);
+ SHOW_OFFSET(root_off, s);
+ SHOW_OFFSET(root_size, s);
+ SHOW_OFFSET(cluster_size, s);
+ SHOW_OFFSET(num_nodes, s);
+ SHOW_OFFSET(num_clusters, s);
+ SHOW_OFFSET(dir_node_size, s);
+ SHOW_OFFSET(file_node_size, s);
+ SHOW_OFFSET(internal_off, s);
+ SHOW_OFFSET(node_cfg_off, s);
+ SHOW_OFFSET(node_cfg_size, s);
+ SHOW_OFFSET(new_cfg_off, s);
+ SHOW_OFFSET(prot_bits, s);
+ SHOW_OFFSET(uid, s);
+ SHOW_OFFSET(gid, s);
+ SHOW_OFFSET(excl_mount, s);
+}
+
+
+static void print_ocfs_disk_lock()
+{
+ ocfs_disk_lock s;
+ SHOW_SIZEOF(ocfs_disk_lock, s);
+ SHOW_OFFSET(curr_master, s);
+ SHOW_OFFSET(file_lock, s);
+ SHOW_OFFSET(last_write_time, s);
+ SHOW_OFFSET(last_read_time, s);
+ SHOW_OFFSET(writer_node_num, s);
+ SHOW_OFFSET(reader_node_num, s);
+ SHOW_OFFSET(oin_node_map, s);
+ SHOW_OFFSET(dlock_seq_num, s);
+}
+
+
+static void print_ocfs_vol_label()
+{
+ ocfs_vol_label s;
+ SHOW_SIZEOF(ocfs_vol_label, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(label, s);
+ SHOW_OFFSET(label_len, s);
+ SHOW_OFFSET(vol_id, s);
+ SHOW_OFFSET(vol_id_len, s);
+ SHOW_OFFSET(cluster_name, s);
+ SHOW_OFFSET(cluster_name_len, s);
+}
+
+
+static void print_ocfs_ipc_config_info()
+{
+ ocfs_ipc_config_info s;
+ SHOW_SIZEOF(ocfs_ipc_config_info, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(ip_addr, s);
+ SHOW_OFFSET(ip_port, s);
+ SHOW_OFFSET(ip_mask, s);
+}
+
+
+static void print_ocfs_guid()
+{
+ ocfs_guid s;
+ SHOW_SIZEOF(ocfs_guid, s);
+ SHOW_OFFSET(id.host_id, s);
+ SHOW_OFFSET(id.mac_id, s);
+}
+
+
+static void print_ocfs_disk_node_config_info()
+{
+ ocfs_disk_node_config_info s;
+ SHOW_SIZEOF(ocfs_disk_node_config_info, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(node_name, s);
+ SHOW_OFFSET(guid, s);
+ SHOW_OFFSET(ipc_config, s);
+}
+
+
+static void print_ocfs_node_config_hdr()
+{
+ ocfs_node_config_hdr s;
+ SHOW_SIZEOF(ocfs_node_config_hdr, s);
+ SHOW_OFFSET(disk_lock, s);
+ SHOW_OFFSET(signature, s);
+ SHOW_OFFSET(version, s);
+ SHOW_OFFSET(num_nodes, s);
+ SHOW_OFFSET(last_node, s);
+ SHOW_OFFSET(cfg_seq_num, s);
+}
+
+
+static void print_ocfs_cdsl()
+{
+ ocfs_cdsl s;
+ SHOW_SIZEOF(ocfs_cdsl, s);
+ SHOW_OFFSET(name, s);
+ SHOW_OFFSET(flags, s);
+ SHOW_OFFSET(operation, s);
+}
+
+
+static void print_ocfs_free_bitmap()
+{
+ ocfs_free_bitmap s;
+ SHOW_SIZEOF(ocfs_free_bitmap, s);
+ SHOW_OFFSET(length, s);
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(node_num, s);
+}
+
+
+static void print_ocfs_free_extent_log()
+{
+ ocfs_free_extent_log s;
+ SHOW_SIZEOF(ocfs_free_extent_log, s);
+ SHOW_OFFSET(index, s);
+ SHOW_OFFSET(disk_off, s);
+}
+
+
+static void print_ocfs_free_log()
+{
+ ocfs_free_log s;
+ SHOW_SIZEOF(ocfs_free_log, s);
+ SHOW_OFFSET(num_free_upds, s);
+ SHOW_OFFSET(free_bitmap, s);
+}
+
+
+static void print_ocfs_delete_log()
+{
+ ocfs_delete_log s;
+ SHOW_SIZEOF(ocfs_delete_log, s);
+ SHOW_OFFSET(node_num, s);
+ SHOW_OFFSET(ent_del, s);
+ SHOW_OFFSET(parent_dirnode_off, s);
+ SHOW_OFFSET(flags, s);
+}
+
+
+static void print_ocfs_recovery_log()
+{
+ ocfs_recovery_log s;
+ SHOW_SIZEOF(ocfs_recovery_log, s);
+ SHOW_OFFSET(node_num, s);
+}
+
+
+static void print_ocfs_alloc_log()
+{
+ ocfs_alloc_log s;
+ SHOW_SIZEOF(ocfs_alloc_log, s);
+ SHOW_OFFSET(length, s);
+ SHOW_OFFSET(file_off, s);
+ SHOW_OFFSET(type, s);
+ SHOW_OFFSET(node_num, s);
+}
+
+
+static void print_ocfs_dir_log()
+{
+ ocfs_dir_log s;
+ SHOW_SIZEOF(ocfs_dir_log, s);
+ SHOW_OFFSET(orig_off, s);
+ SHOW_OFFSET(saved_off, s);
+ SHOW_OFFSET(length, s);
+}
+
+
+static void print_ocfs_lock_update()
+{
+ ocfs_lock_update s;
+ SHOW_SIZEOF(ocfs_lock_update, s);
+ SHOW_OFFSET(orig_off, s);
+ SHOW_OFFSET(new_off, s);
+}
+
+
+static void print_ocfs_lock_log()
+{
+ ocfs_lock_log s;
+ SHOW_SIZEOF(ocfs_lock_log, s);
+ SHOW_OFFSET(num_lock_upds, s);
+ SHOW_OFFSET(lock_upd, s);
+}
+
+
+static void print_ocfs_bcast_rel_log()
+{
+ ocfs_bcast_rel_log s;
+ SHOW_SIZEOF(ocfs_bcast_rel_log, s);
+ SHOW_OFFSET(lock_id, s);
+}
+
+
+static void print_ocfs_cleanup_record()
+{
+ ocfs_cleanup_record s;
+ SHOW_SIZEOF(ocfs_cleanup_record, s);
+ SHOW_OFFSET(log_id, s);
+ SHOW_OFFSET(log_type, s);
+ SHOW_OFFSET(rec.lock, s);
+ SHOW_OFFSET(rec.alloc, s);
+ SHOW_OFFSET(rec.bcast, s);
+ SHOW_OFFSET(rec.del, s);
+ SHOW_OFFSET(rec.free, s);
+}
+
+
+static void print_ocfs_log_record()
+{
+ ocfs_log_record s;
+ SHOW_SIZEOF(ocfs_log_record, s);
+ SHOW_OFFSET(log_id, s);
+ SHOW_OFFSET(log_type, s);
+ SHOW_OFFSET(rec.dir, s);
+ SHOW_OFFSET(rec.alloc, s);
+ SHOW_OFFSET(rec.recovery, s);
+ SHOW_OFFSET(rec.bcast, s);
+ SHOW_OFFSET(rec.del, s);
+ SHOW_OFFSET(rec.extent, s);
+}
+
+
+static void print_ocfs_dlm_msg_hdr()
+{
+ ocfs_dlm_msg_hdr s;
+ SHOW_SIZEOF(ocfs_dlm_msg_hdr, s);
+ SHOW_OFFSET(lock_id, s);
+ SHOW_OFFSET(flags, s);
+ SHOW_OFFSET(lock_seq_num, s);
+ SHOW_OFFSET(open_handle, s);
+}
+
+static void print_ocfs_dlm_reply_master()
+{
+ ocfs_dlm_reply_master s;
+ SHOW_SIZEOF(ocfs_dlm_reply_master, s);
+ SHOW_OFFSET(h, s);
+ SHOW_OFFSET(status, s);
+}
+
+
+static void print_ocfs_dlm_disk_vote_reply()
+{
+ ocfs_dlm_disk_vote_reply s;
+ SHOW_SIZEOF(ocfs_dlm_disk_vote_reply, s);
+ SHOW_OFFSET(h, s);
+ SHOW_OFFSET(status, s);
+}
+
+
+static void print_ocfs_dlm_msg()
+{
+ ocfs_dlm_msg s;
+ SHOW_SIZEOF(ocfs_dlm_msg, s);
+ SHOW_OFFSET(magic, s);
+ SHOW_OFFSET(msg_len, s);
+ SHOW_OFFSET(vol_id, s);
+ SHOW_OFFSET(src_node, s);
+ SHOW_OFFSET(dst_node, s);
+ SHOW_OFFSET(msg_type, s);
+ SHOW_OFFSET(check_sum, s);
+ SHOW_OFFSET(msg_buf, s);
+}
+
+
+static void print_ocfs_recv_ctxt()
+{
+ ocfs_recv_ctxt s;
+ SHOW_SIZEOF(ocfs_recv_ctxt, s);
+ SHOW_OFFSET(msg_len, s);
+ SHOW_OFFSET(msg, s);
+ SHOW_OFFSET(status, s);
+#ifdef LINUX_2_5
+ SHOW_OFFSET(ipc_wq, s);
+#else
+ SHOW_OFFSET(ipc_tq, s);
+#endif
+}
+
+int main(int argc, char **argv)
+{
+ if (argc > 1) {
+ if (!strncasecmp(*++argv, "all", 3))
+ show_all = true;
+ else {
+ usage();
+ exit (1);
+ }
+ }
+
+ print_inode_offsets();
+ print_dentry_offsets();
+ print_filp_offsets();
+ print_super_offsets();
+ print_superops_offsets();
+ print_ocfs_lock_res_offsets();
+ print_ocfs_super_offsets();
+ print_ocfs_global_ctxt_offsets();
+ print_ocfs_cleanup_record_offsets();
+ print_ocfs_dlm_reply_master_offsets();
+ print_ocfs_dlm_msg_offsets();
+ print_ocfs_inode_offsets();
+ print_ocfs_alloc_ext();
+ print_ocfs_io_runs();
+ print_ocfs_offset_map();
+ print_ocfs_log_record();
+ print_ocfs_vol_disk_hdr();
+ print_ocfs_file_entry();
+ print_ocfs_extent_group();
+ print_ocfs_alloc_ext();
+ print_ocfs_publish();
+ print_ocfs_vote();
+ print_ocfs_file_entry();
+ print_ocfs_index_node();
+ print_ocfs_index_hdr();
+ print_ocfs_dir_node();
+ print_ocfs_vol_node_map();
+ print_ocfs_vol_layout();
+ print_ocfs_extent_group();
+ print_ocfs_bitmap_lock();
+ print_ocfs_vol_disk_hdr();
+ print_ocfs_disk_lock();
+ print_ocfs_vol_label();
+ print_ocfs_ipc_config_info();
+ print_ocfs_guid();
+ print_ocfs_disk_node_config_info();
+ print_ocfs_node_config_hdr();
+ print_ocfs_cdsl();
+ print_ocfs_free_bitmap();
+ print_ocfs_free_extent_log();
+ print_ocfs_free_log();
+ print_ocfs_delete_log();
+ print_ocfs_recovery_log();
+ print_ocfs_alloc_log();
+ print_ocfs_dir_log();
+ print_ocfs_lock_update();
+ print_ocfs_lock_log();
+ print_ocfs_bcast_rel_log();
+ print_ocfs_cleanup_record();
+ print_ocfs_log_record();
+ print_ocfs_dlm_msg_hdr();
+ print_ocfs_dlm_reply_master();
+ print_ocfs_dlm_disk_vote_reply();
+ print_ocfs_dlm_msg();
+ print_ocfs_recv_ctxt();
+ print_ocfs_extent_map();
+ return 0;
+}
Added: branches/ocfs-1.0/tools/sizetest/sizetest.h
===================================================================
--- branches/ocfs-1.0/tools/sizetest/sizetest.h 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/tools/sizetest/sizetest.h 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,43 @@
+/*
+ * sizetest.h
+ *
+ * Prints sizes and offsets of structures and its elements.
+ * Useful to ensure cross platform compatibility.
+ *
+ * Copyright (C) 2003 Oracle Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Sunil Mushran, Manish Singh, Wim Coekaerts
+ */
+
+#ifndef _SIZETEST_H_
+#define _SIZETEST_H_
+
+#include <ocfs.h>
+
+#ifdef USE_HEX
+# define NUMFORMAT "0x%x"
+#else
+#define NUMFORMAT "%d"
+# endif
+
+#define SHOW_SIZEOF(x,y) printf("sizeof("#x") = "NUMFORMAT"\n", sizeof(##y))
+
+#define SHOW_OFFSET(x,y) printf("\t"#x" = "NUMFORMAT" (%d)\n", \
+ (void *)&(##y.##x)-(void *)&##y, sizeof(##y.##x))
+
+#endif /* _SIZETEST_H_ */
Modified: branches/ocfs-1.0/unitedlinux/Makefile
===================================================================
--- branches/ocfs-1.0/unitedlinux/Makefile 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/unitedlinux/Makefile 2003-09-03 00:55:02 UTC (rev 8)
@@ -2,6 +2,6 @@
include $(TOPDIR)/Preamble.make
-DIST_FILES = ocfs.init ocfs-2.4.19-64GB-SMP.spec.in
+DIST_FILES = ocfs.init ocfs-2.4.19-64GB-SMP.spec.in ocfs-2.4.19-4GB.spec.in ocfs-2.4.19-4GB-SMP.spec.in
include $(TOPDIR)/Postamble.make
Added: branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in
===================================================================
--- branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,161 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define kver 2.4.19-4GB-SMP
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{kver}
+Version: @DIST_VERSION@
+Release: @RPM_VERSION@
+Copyright: GPL
+Group: System Environment/Kernel
+Source: ocfs- at DIST_VERSION@.tar.gz
+URL: http://ocfs.otncast.otnxchange.oracle.com/servlets/ProjectHome
+Distribution: Oracle
+Vendor: Oracle Corporation
+Packager: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+# Requires: kernel >= %{kver} -- silly UL nodeps
+Requires: k_psmp = 2.4.19-304
+Requires: ocfs-support >= 1.0.8
+# BuildRequires: kernel-source >= %{kver} -- silly UL nodeps
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem. This package is compiled for
+the United Linux SMP kernel.
+
+%package -n ocfs-tools
+Summary: Tools for managing the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: ocfs = %{version}, gtk >= 1.2.8
+BuildRequires: gtk-devel >= 1.2.8
+AutoReqProv: Yes
+
+
+%description -n ocfs-tools
+Tools to manage the Oracle Cluster Filesystem
+
+
+%package -n ocfs-support
+Summary: Support programs for the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: fileutils, sh-utils, net-tools, modutils, aaa_base
+AutoReqProv: No
+
+
+%description -n ocfs-support
+Support programs for using the Oracle Cluster Filesystem.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+ KVER="%{kver}"
+else
+ CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+ case "$CURKVER" in
+ %{kver}*)
+ if test -d "/usr/src/linux-${CURKVER}"; then
+ KVER="${CURKVER}"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+if test -z "$KVER" ; then
+ if test -d "/usr/src/linux-2.4" ; then
+ KPATH="/usr/src/linux-2.4"
+ elif test -d "/usr/src/linux" ; then
+ KPATH="/usr/src/linux"
+ else
+ echo "No kernel tree to build from!" >&2
+ exit 1
+ fi
+else
+ KPATH="/usr/src/linux-${KVER}"
+fi
+
+%configure --sbindir=/sbin --with-kernel="${KPATH}"
+cd ocfs2
+
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}/kernel/drivers/addon/ocfs" install
+
+cd ../tools
+make
+
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+cp -f unitedlinux/ocfs.init $RPM_BUILD_ROOT/etc/init.d/ocfs
+
+cd tools
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%pre -n ocfs-support
+# Cleanup for bad RPMs
+if [ -e /usr/sbin/load_ocfs ] ; then
+ rm -f /usr/sbin/load_ocfs
+fi
+
+if [ -e /usr/sbin/ocfs_uid_gen ] ; then
+ rm -f /usr/sbin/ocfs_uid_gen
+fi
+
+%post -n ocfs-support
+chkconfig --add ocfs
+
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{kver}/kernel/drivers/addon/ocfs
+
+
+%files -n ocfs-tools
+%defattr(-,root,root)
+/usr/bin
+/usr/share
+
+
+%files -n ocfs-support
+%defattr(-,root,root)
+/sbin/load_ocfs
+/sbin/mkfs.ocfs
+/sbin/ocfs_uid_gen
+/etc/init.d/ocfs
+
+
+%changelog
+* Tue Apr 22 2003 Joel Becker <joel.becker at oracle.com>
+- Modified for United Linux
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce <philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup
Added: branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB.spec.in
===================================================================
--- branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB.spec.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-4GB.spec.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -0,0 +1,161 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define kver 2.4.19-4GB
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{kver}
+Version: @DIST_VERSION@
+Release: @RPM_VERSION@
+Copyright: GPL
+Group: System Environment/Kernel
+Source: ocfs- at DIST_VERSION@.tar.gz
+URL: http://ocfs.otncast.otnxchange.oracle.com/servlets/ProjectHome
+Distribution: Oracle
+Vendor: Oracle Corporation
+Packager: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+# Requires: kernel >= %{kver} -- silly UL nodeps
+Requires: k_deflt = 2.4.19-304
+Requires: ocfs-support >= 1.0.8
+# BuildRequires: kernel-source >= %{kver} -- silly UL nodeps
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem. This package is compiled for
+the United Linux SMP kernel.
+
+%package -n ocfs-tools
+Summary: Tools for managing the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: ocfs = %{version}, gtk >= 1.2.8
+BuildRequires: gtk-devel >= 1.2.8
+AutoReqProv: Yes
+
+
+%description -n ocfs-tools
+Tools to manage the Oracle Cluster Filesystem
+
+
+%package -n ocfs-support
+Summary: Support programs for the Oracle Cluster Filesystem
+Group: System Environment/Kernel
+Requires: fileutils, sh-utils, net-tools, modutils, aaa_base
+AutoReqProv: No
+
+
+%description -n ocfs-support
+Support programs for using the Oracle Cluster Filesystem.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+ KVER="%{kver}"
+else
+ CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+ case "$CURKVER" in
+ %{kver}*)
+ if test -d "/usr/src/linux-${CURKVER}"; then
+ KVER="${CURKVER}"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+if test -z "$KVER" ; then
+ if test -d "/usr/src/linux-2.4" ; then
+ KPATH="/usr/src/linux-2.4"
+ elif test -d "/usr/src/linux" ; then
+ KPATH="/usr/src/linux"
+ else
+ echo "No kernel tree to build from!" >&2
+ exit 1
+ fi
+else
+ KPATH="/usr/src/linux-${KVER}"
+fi
+
+%configure --sbindir=/sbin --with-kernel="${KPATH}"
+cd ocfs2
+
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}/kernel/drivers/addon/ocfs" install
+
+cd ../tools
+make
+
+
+%install
+
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+cp -f unitedlinux/ocfs.init $RPM_BUILD_ROOT/etc/init.d/ocfs
+
+cd tools
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%pre -n ocfs-support
+# Cleanup for bad RPMs
+if [ -e /usr/sbin/load_ocfs ] ; then
+ rm -f /usr/sbin/load_ocfs
+fi
+
+if [ -e /usr/sbin/ocfs_uid_gen ] ; then
+ rm -f /usr/sbin/ocfs_uid_gen
+fi
+
+%post -n ocfs-support
+chkconfig --add ocfs
+
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{kver}/kernel/drivers/addon/ocfs
+
+
+%files -n ocfs-tools
+%defattr(-,root,root)
+/usr/bin
+/usr/share
+
+
+%files -n ocfs-support
+%defattr(-,root,root)
+/sbin/load_ocfs
+/sbin/mkfs.ocfs
+/sbin/ocfs_uid_gen
+/etc/init.d/ocfs
+
+
+%changelog
+* Tue Apr 22 2003 Joel Becker <joel.becker at oracle.com>
+- Modified for United Linux
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce <philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup
Modified: branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in
===================================================================
--- branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in 2003-09-03 00:55:02 UTC (rev 8)
@@ -1,5 +1,5 @@
#
-# Spec file for cvsman
+# Spec file for ocfs
#
# Macros
@@ -24,6 +24,7 @@
Provides: ocfs = %{version}
AutoReqProv: no
# Requires: kernel >= %{kver} -- silly UL nodeps
+Requires: k_smp = 2.4.19-304
Requires: ocfs-support >= 1.0.8
# BuildRequires: kernel-source >= %{kver} -- silly UL nodeps
Modified: branches/ocfs-1.0/unitedlinux/ocfs.init
===================================================================
--- branches/ocfs-1.0/unitedlinux/ocfs.init 2003-05-12 22:50:28 UTC (rev 7)
+++ branches/ocfs-1.0/unitedlinux/ocfs.init 2003-09-03 00:55:02 UTC (rev 8)
@@ -20,13 +20,13 @@
#
LOAD_OCFS=/sbin/load_ocfs
-test -x "$LOAD_OCFS" || exit 0
+test -x "$LOAD_OCFS" || exit 5
-test -r /etc/ocfs.conf || exit 0
+test -r /etc/ocfs.conf || exit 6
KVER="`uname -r`"
case "$KVER" in
-2.4.19-64GB-SMP)
+2.4.19-64GB-SMP|2.4.19-4GB-SMP|2.4.19-4GB)
MODPATH="/lib/modules/${KVER}/kernel/drivers/addon/ocfs"
;;
*)
@@ -35,7 +35,7 @@
;;
esac
-test -r "$MODPATH/ocfs.o" || exit 0
+test -r "$MODPATH/ocfs.o" || exit 5
# Source init.d functions
. /etc/rc.status
@@ -48,7 +48,7 @@
{
# Are there any volumes to mount?
ANY="`awk '/^[ ]*#/{next}$4 ~ /^noauto$|^noauto,|,noauto$/{next}$3 == "ocfs"{print $2}' /etc/fstab 2>/dev/null`"
- test -z "$ANY" && exit 0
+ test -z "$ANY" && return
# Check if anything is missing netdev
ANY="`awk '/^[ ]*#/{next}$4 ~ /^noauto$|^noauto,|,noauto$/{next}$4 ~ /^_netdev$|^_netdev,|,_netdev$/{next}$3 == "ocfs"{print $2}' /etc/fstab 2>/dev/null`"
@@ -67,21 +67,25 @@
# Note that UnitedLinux doesn't have NETWORKING=no
if grep '^ocfs ' /proc/modules >/dev/null 2>&1; then
- $?=0
rc_status -v
- exit 0
+ rc_exit
fi
- # action - DO NOT REMOVE, this is to trick RH /etc/rc
"$LOAD_OCFS"
rc_status -v
;;
+ status)
+ echo -n $"Checking if OCFS is loaded: "
+ grep '^ocfs ' /proc/modules >/dev/null 2>&1
+ rc_status -v
+ ;;
+
stop|force-reload|restart)
;;
*)
- echo "Usage: $0 {start|stop|restart|force-reload}"
+ echo "Usage: $0 {start|stop|status|restart|force-reload}"
exit 1
esac
More information about the Ocfs-commits
mailing list